Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / How to make object follow path?

Author
Message
Mugen Wizardry
User Banned
Posted: 29th May 2010 19:48
How can I make an object follow a path?

Just like in the 1st

30 seconds in this video here:

http://www.youtube.com/watch?v=sY3BOgQJ8wE

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
ShaunRW
DBPro Developer
18
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 30th May 2010 04:15
The way i do this is by using waypoints. Place a hidden object at every corner on the map. When the NPC gets to one of the hidden, you point it to the next hidden object.

Actually here is a good example: http://forum.thegamecreators.com/?m=forum_view&t=30299&b=6

Hope it helps, i didn't watch the video because my net is slow at the moment.

BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 30th May 2010 05:26 Edited at: 30th May 2010 05:27
The video demonstrates a very curvy, twisting path. Waypoints may not work well for this because you need to use too many to get smooth curves.

My first instinct is to try making a path with bezier curves down the middle of the "roadway" and automatically rotate the player to the angle of the line tangent to the curve nearest their location, which would still allow them to strafe across the road. I don't know if you're up to that, though.

EDIT; By the way, Shaun, it's one of those 3D Sonic games, if that gives you any idea .

Login to post a reply

Server time is: 2026-07-25 08:29:47
Your offset time is: 2026-07-25 08:29:47