Follow Path

General discussion about the R.U.B.E editor
Post Reply
ngreenwood6
Posts: 2
Joined: Wed Jul 02, 2014 3:05 pm

Follow Path

Post by ngreenwood6 »

I have been playing with the R.U.B.E editor for the last couple of days and its working good so far (which I am gonna buy tonight btw). I was just wondering if there is a way to make an object follow a path. For example I have a square fixture made that I wanted an object to follow. I had set it up with a prismatic joint and was thinking that I would be able to attach multiple joints until it went around in a circle but it wasn't possible. So I was wondering if there was a way to do it in the editor. Sorry just a noob here!!!

Thanks
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Follow Path

Post by iforce2d »

RUBE helps you set up a starting state for the world. Anything that happens after the scene is loaded depends entirely on your program. You will still need to program the control logic for things that move around in your game once the scene is set up.

Moving a body along a path is an extension of moving it to a specific point, which seems to be a rather frequent question on Stack Overflow. The only difference being, to move it along a path you would continuously update the target point.

If the path to follow is a static one, RUBE could perhaps help in that you could draw the path as a loop or polygon fixture, get all the points from it after loading, and then destroy the fixture.
ngreenwood6
Posts: 2
Joined: Wed Jul 02, 2014 3:05 pm

Re: Follow Path

Post by ngreenwood6 »

I thought that this might be the case but I wasn't sure if there was a way to set it up in RUBE to just kind of play with the motions to see what it might look like. Thanks for the response. Also, I just wanted to say thanks for all the tutorials on your site as well as the RUBE program. It is truly a great help to a learning game programmer.
Post Reply