Player mounting at differnt rotations on vehicles
by Ali Khan · in Torque Game Engine · 12/13/2006 (11:52 pm) · 2 replies
Hi Everyone,
When I mount my player on vehicles I get them at the correct position but the orientation keeps on changing.
When the vehicle rotation is 0 0 0 the players are mounted correctly, that is facing the wind screen. Then I turn the vehicle so that is faces in some other direction.
Then I get out of the vehicle and mount it again. This time I am facing in some other direction, sometimes even facing away from the wind screen.
The following screen shots would explain this better.
[IMG]http://img170.imageshack.us/img170/446/mountcorrectie3.th.jpg[/IMG]
[IMG]http://img99.imageshack.us/img99/39/mountinvertedpu6.th.jpg[/IMG]
It seems the mounted player takes direction from the direction of the vehicle. I can't seem to find any script or C++ code to control the mounting direction.
Ali Khan.
When I mount my player on vehicles I get them at the correct position but the orientation keeps on changing.
When the vehicle rotation is 0 0 0 the players are mounted correctly, that is facing the wind screen. Then I turn the vehicle so that is faces in some other direction.
Then I get out of the vehicle and mount it again. This time I am facing in some other direction, sometimes even facing away from the wind screen.
The following screen shots would explain this better.
[IMG]http://img170.imageshack.us/img170/446/mountcorrectie3.th.jpg[/IMG]
[IMG]http://img99.imageshack.us/img99/39/mountinvertedpu6.th.jpg[/IMG]
It seems the mounted player takes direction from the direction of the vehicle. I can't seem to find any script or C++ code to control the mounting direction.
Ali Khan.
#2
Call this method after the player is mounted.
12/14/2006 (11:44 pm)
This should allign your Players rotation properly: %player.setTransform("0 0 0 0 0 1 0");Call this method after the player is mounted.
Torque Owner Martin Schultz