- Home /
How to make the camera is not break trough object?
I create a FPS parkour game when my character sliding and vault, the camera is break trough the hand.
Answer by Paulius-Liekis · Aug 18, 2013 at 07:55 PM
Try reducing near plane value? Or show some shots what you mean by "break through object".
I'm not very fluent in english, I'm from Indonesia, this is the picture
I think he means clipping, in which case you could probably try to add a collider to the camera to check if the camera is interacting with any geometry in the level and adjust the cameras position accordingly or at last prevent it from going through the geometry.
I remember seeing some great World of Warcraft camera script so try taking a look at http://forum.unity3d.com/threads/16949-WOW-Camera-$$anonymous$$ovement or http://unity3dmmo.codeplex.com/discussions/245203. I'm not sure if it's the same script, but the one I found months ago handled this problem just fine.
Thanks for the solution, btw im from Indonesia so im not very fluent in english
Answer by scipiothegreat · Aug 24, 2013 at 02:08 AM
Cast a ray from the character to the camera and place the camera wherever the ray hits.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Null Reference Exception ? :/ 1 Answer
Can someone help me understand this code. 1 Answer
Finding game object, not working 2 Answers
Rotate camera around gameobject 1 Answer