Hello! I have been working on a futuristic racing game for nearly four weeks now, I have my controls and animations all scripted.
Here’s the only problem…
My Racing Vehicle goes through walls!!
I have tried the “DontGoThroughThings” script on the wiki, and every time I collide with a wall, my vehicle’s rigidbody kicks in and it flies off into the void. I have tried to turn off gravity (which stops my vehicle plonking onto the ground) and making the object kinematic (Still goes through walls), I don’t know what to do!?!?
SETUP:
My player controls a hovering vehicle, this vehicle has an empty gameobject to control steering/acceleration. This object stays on the same Y axis position throughout the race (faking the hover effect). A secondary object is the pretty part, as it is the ship mesh that rotates and moves to give a realistic effect.
WHAT I WANT:
Whenever this player collides with a wall (whether it be the side or front of the vehicle) it slows down.
Is this possible without a rigidbody?
CONTROL SCRIPT:
1581807–94413–$ShipController.js (410 Bytes)