Advertisement Jump to content
Sign in to follow this  

how to make an oject move along a path?

This topic is 5126 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

please provide code to make an oject seem to be animated by making it follow a path.this will be used to make a car follow a road in 2D.Provide me ideas where i will be able to do some multithreading easily as there will be around 40000 cars whose traffic is to be simulated. thanks

Share this post

Link to post
Share on other sites
hello ..
ok let's say your path is line and you have an array for its vertexes positions like this array
float path[poins_size][2];
in the render function do this thing:

if (i==point_size)

this will make the object move along the path.
i hope it works.
please tell me if this isn't the right way

bye !

[Edited by - ff8 on January 9, 2005 4:28:17 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!