- Home /
Using the head look controller as a method to keep ship level with ground.
Well I want my ship I have built to stay level with the ground, and was wondering if I used the head look controller to tell the mesh on the underside of the ship to always be looking at the mesh under it, it would stay level. The only problem is that in this case it will always see terrain under it, but I want it to mimic the angle at which it is off the ground, ex/ going up a mountain it will reel up, and on the surface it will move up when it goes over a bump. It is leviating off the ground. Another method I thought may be possible was to have wheel colliders that were invisible, but this would give it a less sci fi feel.
I don't understand your question @"level with the ground", etc.. please try to re-explain, u can put scripts/pictures which will be better.
Sorry for that, but its basically so if it moves over an object it rises in the air, so it is always hovering off the ground at a certain height.
Answer by StephanK · Jun 23, 2010 at 11:45 PM
- Do a raycast in -Vector3.up direction.
- Get the hitinfo.normal.
- Align your up vector with the normal.
Sorry to ask for more specifics, but could you give a slightly more detailed version?
Your answer
Follow this Question
Related Questions
GUI Over AI characters 1 Answer
Display name on my character 2 Answers
Character Interface Change (Help) 0 Answers
How do I use my models with the Head look controller demo? 3 Answers
mouselook on head bone 1 Answer