- Home /
How to simulate a vehicle moving only by moving terrain with itween/waypoints?
Hi all, this is my first question here on unity3d, and i believe i have a unique case and i am trying hard to solve this problem.
Lets say you have a loop road, with various height and also bends. The vehicle will be still and only the terrain is movable.
How do i make my terrain move with the waypoints such that it follows the rotations and also the up and down slopes of the road route.
Why do you want to do it this way? Practically speaking, there's no difference if you keep the terrain still and move the vehicle. And moving the vehicle is certainly more intutive than moving the terrain.
If your goal is simply to maintain a top-down view on the vehicle as it rides up hills, then group the camera with the vehicle so it is a child of the vehicle's transform.
The reason is that i need to have both AI characters and controlled characters walking around just like in real world situation.
I tried ways to place 3rd person controllers on the platform but it just slips off out of control, so i thought the next best way would be to animate the terrain ins$$anonymous$$d to make it look like the vehicle is moving.
The characters need not be getting off the vehicle as well, the whole scene is inside the vehicle, with windows looking outside.