Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

what happens first?

This topic is 5383 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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..

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!