- Home /
Aicraft Collision with Terrain not working
Hello All,
A pre-emptive thankyou for any help. I am currently making a flying game and I am having issues with the aircraft flying through the terrain. My terrain has a terrain collider and my aircraft object has a rigid body and character controller as my parent object and several capsule and box colliders (for the wings, fuselage etc) on other objects under the aircraft (parent) object. I have viewed a few similar Q's on here however I cannot seem to get it to work. Any suggestions will be greatly appreciated.
you can't do the rigidbody plus character controller thing, thats just wierd.
Rigidbodies are a game component you add to a game object to allow the object to interact with and respond during the physics step. It allows gravity and acceleration and collision and all that good physics stuff.
CharacterController is a game component you add to a game object to allow the object to have collisions EVEN THOUGH it's movement is not physics based. All collisions require a rigidbody EXCEPT charactercontroller ones which is a special components put in just for first person shooter games basically. Alternately games with Arcade movement where your movement is scripted and not calculated can still use them.
If its a plane game and you want arcade controlling, that is they can defy physics and perform 90 degree climbing for example, use a charactercontroller.
If you want them to have to apply forces to the plane to move it then remove the character controller and use a rigidbody.
Answer by FlyingOstriche · Oct 29, 2012 at 10:37 AM
Ive never seen a character controller being used with a rigidbody before as they both do collision detection.
Try giving the parent object a collider.
Does it go through the terrain because the aircraft is travelling to fast? if it goes slowly does it still go through.
I set the aircraft to fly slowly. I had another look at it and I had 2 char controllers on it, so I took one away and it works now. Thanks for your help.
Answer by Meacho · Nov 13, 2012 at 08:56 AM
Thanks for your help. I set it up with a Char controller only and it works
Your answer