|
Pan = Roll?
#44569
04/18/05 18:51
04/18/05 18:51
|
Joined: Apr 2005
Posts: 64 Italy - Rome
_Tommo_
OP
Junior Member
|
OP
Junior Member
Joined: Apr 2005
Posts: 64
Italy - Rome
|
I'm trying to make a game where a entity can walk normally on a vertical wall. But i found a big problem...when the tilt of the entity is 90 (on the wall), the pan angle, wich doesn't rotate along with the entity, becomes equal to roll angle. So when using left/right arrows, the entity doesn't turn normally, but rolls as if I changed the roll angle. There are ways to fix this? (sorry for the bad english...and ask if something isn't clear  )
|
|
|
Re: Pan = Roll?
[Re: Grimber]
#44575
05/16/05 05:59
05/16/05 05:59
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
use ang_add to change a temp vector, then set your player position vector to it for object axis oriented rotation: if(key_g==on){vec_add(temp.x,(1,0,0)} ang_add(temp.x,player.x) vec_set(player.x,temp.x)
or you can adjust your angles with sines and cosines, vec_for_angle, and vec_to_angle which might work depending on your situation. Oh yeah, my game that has an angel flying around wouldn't work if you couldn't rotate him whichever way you want. I've found that 3D gamestudio's "Euler" rotation allows pan to only rotate around the z, tilt to rotate around x or y and roll around any axis (now that's pretty confusing!)
|
|
|
|