- Home /
Allign player to walls?
I am making a futuristic racing game based mainly in tunnels, I already have the control scripts but now I'm looking for a way to have my player move around the walls and ceiling of the tunnel, pretty much making the player capable of driving on the ceiling. I have tried several different methods and asked around a fair bit, but no one seems to be able to help me. :(
Here's how it should look:
If anyone can help me, It will be like getting a burden off my shoulders as this has been frustrating the heck outta me!
How are you planning on moving the object: Rigidbody, Character controller, directly manipulation Transform?
Are the tunnels axes aligned or do they go off at angles?
Do the tunnels branch, and if so are the branches axes aligned?
Hey, thanks for responding :) - The object is (at the moment) not Rigidbody or a Character controller. It is mainly using transform functions. - The tunnel does not branch off but ins$$anonymous$$d, bends and turns. Like This Game - Ballisitics : https://www.youtube.com/watch?v=BXj5tuAtfGs
You could try making some fake gravity that would pull the object closer to the tunnel walls. In this case, you could probably just make a rayCast or linecast down the player object and just check if the tunnel is within reach and move it down until it's close enough.. (like check the distance from the ray, perhaps)