How to make player rotate with the terrain
by joe car · in Torque Game Builder · 10/22/2012 (4:12 pm) · 3 replies
I'm working on putting together my first little project. It's going to be a simple side scrolling platformer. In the game I plan on having the character get inside of a vehicle. The vehicle won't be controlled by the player (with the exception of being able to jump) but the problem I'm running into is getting the vehicle to rotate with the terrain, for instance, if it was going down a slope and hit a ramp at the end. Can someone point me in the right direction to accomplish this? Any help is greatly appreciated.
#2
If this is a one time thing for show than Vlad's idea would probably be easier though.
10/22/2012 (10:53 pm)
First thing I would do is see if you can use the built-in rigid physics collision option. The engine would handle rotating to the slope and you just tell the vehicle to move in the position it is facing. At least that's my theory. Some special coding would have to fix downhill collisions but it would be worth it.If this is a one time thing for show than Vlad's idea would probably be easier though.
#3
@Alpha-Kand, great point.
@joe, what Alpha is talking about is dealing with when the collision box of the vehicle hits the corner of the clope and level ground.
10/25/2012 (12:24 pm)
@Vlad, I'm thinking of doing this for my platformer - wondering how goofy it will look though, haha.@Alpha-Kand, great point.
@joe, what Alpha is talking about is dealing with when the collision box of the vehicle hits the corner of the clope and level ground.
Vlad I
Default Studio Name