- Home /
Why does a collider make my vehicle fly away?
Hi,
I am using some code that I wrote to make a vehicle that can fly and drive. when driving it uses asdw for movement. when it is flying it uses the mouse for pitch and yaw and then moving backward and forward still uses s & w… The issue I am having is:
With wheel colliders my vehicle flies off into the stratosphere... With any other type of collider, even a simple box collider, my vehicle seems to fly further and further away when I move the mouse in any direction.
I need some form of collision detection as when I go to take off my vehicle clips through the terrain, and I do not want that.
They both only seem to occur when I am in flight mode :/
Thanks,
Dex,
Answer by DexEze · Dec 14, 2018 at 07:04 AM
Turns out it was having both a rigidbody and a collider on my vehicle that was causing the issue :/
I fixed it by freezing the position on the rigidbody. currently i have frozen x, y & z. If i get around to testing each individually and it needs anything other than all of them i will edit this comment again...
Answer by Vibertex · Apr 01, 2020 at 12:26 AM
How did that affect it? I used a box collider and a rigid body and my car worked fine, but it didn't work the second time. Could you explain why mine didn't work the second time?
Your answer
Follow this Question
Related Questions
Probably another "bullet through paper problem". Jerks, teleports, and other problems 0 Answers
Childs Collision Calls Parents OnTriggerEnter2D() 0 Answers
Mesh collider problem with two models next to each other 0 Answers
How to make player keep getting hurt when touching fire? 1 Answer
When I throw the projectile, it triggers the land collision before landing on it 0 Answers