Constrain Movement to Path

View previous topic View next topic Go down

Constrain Movement to Path

Post  uprise78 on Thu Sep 03, 2009 12:24 am

What would be the easiest way to constrain the movement of an object to a path in 2 dimensions? For example, if there was a train riding on a track the train should only be able to travel forward/backward along the track and jump up off the track but the train should always stay over the track. The only thing I can think of is creating invisible static walls on the left and right side of the track and letting Bullet do the rest but it seems inefficient.

Any ideas?

uprise78

Posts : 228
Join date : 2008-10-31

View user profile

Back to top Go down

Re: Constrain Movement to Path

Post  Francescu on Thu Sep 03, 2009 1:06 am

IPO animation that you could play backward and forward....

Francescu

Posts : 136
Join date : 2009-03-18

View user profile

Back to top Go down

Re: Constrain Movement to Path

Post  uprise78 on Thu Sep 03, 2009 8:27 am

IPO was the first thing I thought of but it won't work. The constrained object is the player object and needs to be freely movable left, right and jump.

uprise78

Posts : 228
Join date : 2008-10-31

View user profile

Back to top Go down

Re: Constrain Movement to Path

Post  uprise78 on Wed Sep 09, 2009 3:32 pm

Does anybody have any pointers to get me going in the right direction on this one?

uprise78

Posts : 228
Join date : 2008-10-31

View user profile

Back to top Go down

Re: Constrain Movement to Path

Post  sio2interactive on Wed Sep 09, 2009 3:40 pm

Im available for consultations at anytime Wink

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Constrain Movement to Path

Post  uprise78 on Sun Sep 13, 2009 11:03 pm

I would love to hire you for some consultation but right now I am still in the 'playing around' stage learning the engine, learning Blender and just making small bits of games so consultation for something that will probably be thrown away isn't an option. Perhaps later in winter when the real game begins...

uprise78

Posts : 228
Join date : 2008-10-31

View user profile

Back to top Go down

Re: Constrain Movement to Path

Post  goldfrapp0x0309 on Mon Sep 14, 2009 6:52 am

You could reuse the sio2 ipo code and add if switches to the interpolated x,y,z locations and rotations sections. Then you'll have control over the constraint of the object to the ipo curve on every loop, for every dimension.
avatar
goldfrapp0x0309

Posts : 43
Join date : 2009-02-28

View user profile

Back to top Go down

Re: Constrain Movement to Path

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum