- Home /
Tripping Over my FPS Weapon
I'm using the Unity First Person Controller and once the player finds/activates a weapon its getting attached to the first person camera. Mouse Look is fine, I can see all around. Moving forwards, backwards, sideways is fine UNTIL I try to move while looking down. Its almost as if my FirstPersonController is tripping over the weapon (forward movement becomes jerky even stopping sometimes)
Any ideas how I can fix this???
Answer by HarshadK · Dec 31, 2014 at 12:01 PM
Looks like your child (gun) is colliding with your parent object (player).
Solutions:
Either restrict the movement that a user can look downwards to avoid gun colliding with player object.
Set collision matrix for gun and player layers to not collide. Your gun and player may be on same layer or different layers.
Yes that was it. Not sure why that didn't occur to me. I'll have to look into matrix/layers (not something I've touched on yet) Restricting the downwards movement fixed it for now. Although only having -35 degrees is a little too restrictive. I'll definitely have to work on the other method you suggested but for now its a temp fix
Thanks
Your answer
Follow this Question
Related Questions
First person diagonal movement problems 0 Answers
Why does this script make my camera jump when I move back? 1 Answer
How make movement speed constant with FPS? 1 Answer
Proper Fixed Timestep for 30 FPS 1 Answer
Player moving without input 2 Answers