After adding a jump script to my FPS game which has gun clipping , it doesn’t work. Whereas, if I add the jump script to my FPS game without the gun clipping part, it works.
Project Link: https://playcanvas.com/project/1276228/overview/gun-clipping
Please Help.
1 Like
adding the gun to a different layer so that it doesn’t go through walls or other objects in your game.
ALUCARD
November 16, 2024, 7:05pm
5
I have been trying to figure out how to do that myself
ALUCARD
November 16, 2024, 7:08pm
6
You really dont need all these useless entities. Move every entity that has a render into one parent entity and delete every entity that has nothing.
1 Like
Here’s how to do it:
1. Go into the project settings, click on “Layers” and add a layer called “Weapon”
2. In the shotgun template, remove the “World” layer and add the “Weapon” layer to every render.
3. Go into the project settings again, click on “Layers” and change the “Render Order” to this:
ALUCARD
November 16, 2024, 7:17pm
8
For me that just makes the gun invisible
Is the hierachy the same? My hierachy is this:
ALUCARD
November 16, 2024, 7:23pm
10
weapon camera? Do I need 2 cameras? Sounds quite taxing
1 Like
The original Camera’s priority is 0 and the WeaponCamera’s priority is 1 .
ALUCARD
November 16, 2024, 7:25pm
12
I can now see the gun, but the gun is entirely black.
Could you please send me the project link so I can compare both projects?
ALUCARD
November 16, 2024, 7:26pm
14
I can change the color with emission, so it must be lighting related.
ALUCARDS LETHAL MUNITIONS EXPO | Editor
What entity is the gun called and which entity is it located in?
1 Like
Yeah, I think this is a lighting problem . Adding a light should help or adding a skybox could also work but you have walls around you.
ALUCARD
November 16, 2024, 7:32pm
18
The light is attached to the camera, it should be working.
1 Like
In that case, if you wouldn’t mind, could you please create another scene and place player entity without all the other models that are not needed as of now. It’s because its all cluttered and messy right now.
ALUCARD
November 16, 2024, 7:34pm
20
what is “cluttered and messy”?