Game Development Community

Slopes and XY axis - Player Bounding Box Rotation

by Swaroop Reddy · in Torque Game Engine · 10/28/2007 (1:52 am) · 4 replies

Does any one have any idea how to get player objects to rotate along the X and Y axis when they are one a hill slope. The Racing starter kit shows that the vehicle bounding box rotates in the approrate direction along the X and Y axis when it is on a slope. How can this be implemented on an player object. For bipeds this is not an issue but for animals such as horses it is a MAJOR draw back. Imagine a horse climbing up a hill without rotating its body to match the slope - NOT VERY PLEASANT. I havent seen this addresed anywhere in the forums. Animals follow the slope perfectly in the game Wildlife Tycoon: Venture Africa. Player objects DO NOT rotate along the X or Y axis even if you use setTransform(). They only rotate along Z axis. There must tbe some way to rotate them.

#1
10/28/2007 (2:03 am)
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3148
This should be just what you're looking for. I implemented it yesterday, and it works really nicely.
#2
11/18/2007 (2:14 am)
Daniel

I forgot to thank you. I saw your post the same day. It is working good. I am now working on the player rotating only on HIS y and z axis. I dont like the way he slopes to his right or left side a slope.

Thanks
#3
11/18/2007 (3:00 am)
Hey, this is just the code I needed to get my Players to conform properly to vehicles they're standing on/in. Thanks.
#4
11/19/2007 (12:24 pm)
My suggestion here:
http://www.garagegames.com/mg/forums/result.thread.php?qt=69251#499907
might help for Swaroops problem.