- Home /
GUN QUESTION ?
Hi all,
i was wondering if someone could help me. Basically if you guys know in fps games if you go next to a wall with the gun facing out it will stay viewable. But in unity if i go next to all with the gun facing out it will go trough the mesh how can i stop this ?
thank you in advance :)
Answer by · Jun 21, 2011 at 04:42 AM
Typically, the PlayerCharacter in FPS will have a larger bounding box (physics proxy) than the actual character. The gun stays viewable because the character's physics prevent them getting close enough to the wall to cause intersection.
So if i add a big box in front of the gun it would prevent it from going trough the walls ?
Assu$$anonymous$$g you've set up your character to move around using physics - Rigidbody.$$anonymous$$ove(), iirc. You'd probably want a large box shape ins$$anonymous$$d of the actual physics of the gun, or it could get caught (and stop movement) in all sorts of places that you wouldn't want.
hmm the problem is the player is not controlled by physics its all done by character controller i have used the standard fps input controller :)
Thank you so so so so so so so lol much it worked even tough i did not use physics you are a life saver cheers mate :)
Your answer
Follow this Question
Related Questions
Simply Importing Assests Breaks my Unity Game 0 Answers
FPS control camera 1 Answer
Lens-Flare Muzzleflash 0 Answers
What is AutoWayPoint 1 Answer
How to swap an animation between two different models? 1 Answer