what happens first?

Started by
18 comments, last by cman 20 years, 8 months ago
Hi! If you specify turning and moving in one update cycle, then which happends first? Moving or turning? My bot turns, then it start going to the new dir, or its goes to the last dir, then turns? thanks [edited by - cman on August 16, 2003 6:30:26 AM]
Advertisement
i think its first move then rotate (my mapping works this way and it looks ok)


T2k
from what I can tell, its the same as what T2K said.

but I also send my data to gdarena in that order, so MAYBE it just does it in whatever order we tell it to do it.
Beer - the love catalystgood ol' homepage
Yes and what about strafing and firing?
thanks
They happen "simultaneously"... I guess it would be like turning and then moving. It's not like a 3D graphics API where translation/rotation is order-dependent..

Admin for GameDev.net.

Khawk: It has to be dependant... you either update the angle first, then move along that angle, or move along the original angle, then update the angle. It''s impossible to do both at the same time, and doing it one way or the other DOES change the final destination point if they both turned, and moved/strafed.
I haven''t done this my self, but couldn''t it be done by modifying his own matrix at the end of the update() functions to apply both movement and rotation at the same time when it is loaded into the Modelview Matrix? Just a guess, I''ve never done that my self, but seems like it could be done that way simaltaniously. Could (and probably am) wrong though.

-J
quote:Original post by Ready4Dis
Khawk: It has to be dependant... you either update the angle first, then move along that angle, or move along the original angle, then update the angle. It''s impossible to do both at the same time, and doing it one way or the other DOES change the final destination point if they both turned, and moved/strafed.


Um, not really..

I don''t even understand _how_ this question can come up. Your bot rotates about its vertical axis, and not about some imaginary translated axis.

Admin for GameDev.net.

quote:Original post by Jason2Jason
I haven''t done this my self, but couldn''t it be done by modifying his own matrix at the end of the update() functions to apply both movement and rotation at the same time when it is loaded into the Modelview Matrix? Just a guess, I''ve never done that my self, but seems like it could be done that way simaltaniously. Could (and probably am) wrong though.

-J


I think the view of movement is just wrong.. it''s a simple:

x += x*sin(theta);

or something like that. It''s not exceptionally complicated.

Admin for GameDev.net.

This topic is closed to new replies.

Advertisement