PDA

View Full Version : [Editor] Help - Moving objects along a path



Mister_Leroy
05-12-2014, 09:35 AM
Hey guys, sorry for paintmash early on a Monday morning.

http://i.imgur.com/PbaqbeA.png
http://i.imgur.com/PbaqbeA.png

I'm a part of a level editing duo. We're getting to grips by mostly self learning the tools at our disposal.

We are having trouble moving objects along a path, with multiple points on it -- namely, animation. not just moving an object from A to B, or have it follow something else, but actually have an object moving along a predetermined path (using what we think are correct-- Vectors and Dummy objects).

Above is a diagram from memory of our set up. Anyone able to offer some insight as to why this doesn't work? The first leg works ok - the heart moves from the first object to the 2nd. Then it seems to break, moving instantly to the 3rd object and flickering every tick between object 3 and 1 for the duration of the animation.

Really welcome some advice - thanks!

Mister_Leroy & INCUBA3E

//edit:

The intervals are set to 1 tick apart
The first curve eases in, the 2nd is linear, the 3rd eases out (were hoping this would accelerate and decelerate the object)

Fernanjoe1
05-12-2014, 10:06 AM
Hello. Looking at your diagram, i think i would use state events to turn on the data sources as you need them, as I find that more reliable than using the delay on the impules triggers. If not then they will be running as soon as you activate physics and so that may be why your object teleports after the first section. Basically the linear data source would be active from the go and so by the time your impulse reaches the Object position event the curve of the data source has finished and it takes the end value.

Make sure your interval trigger and linear data sources for the 2nd and 3rd point are disabled, then use a delay filter inbetween setting off the 1st impulse which goes to a state event to enable the 2nd, then the same for the 3rd.

You could also use the one O.P.E and change the values of the linear data source with some variable data sources.
Hope this helps, sorry if not.

BMXBandit777
05-12-2014, 11:52 AM
Check out the stickied tutorials thread at top of level editor page, there's one in there by jamminben007 (no. 38 on full list) called - how to move an object on a irregular looping path - I think it will help with what you want :)

IImayneII
05-12-2014, 12:56 PM
If your drawing is the same what you have in the editor, the problem is most likely that the curve has already started before the impulses get to the ope so the object immediatly jumps to where the curve is at that time. Best option is to turn the curve off and turn it ON when the interval starts to work.

So just use an interval with the same delay (disabled after 1 tick) connected to a state event (ON) connected to the curve.


A different setup would be to use one OPE setup and just change the value's according to the movement, wich is better imo. Something like this:
Just make sure everything has the "reset at checkpoint restart" unchecked. And if you have any questions about the setup, just ask.

http://i.gyazo.com/03db94a4b515e5c8940c6443bd340946.png

http://i.gyazo.com/26a894f33f05c54f25ecd902df962444.png

SparkierJoNESZ
05-12-2014, 01:01 PM
Check out the stickied tutorials thread at top of level editor page, there's one in there by jamminben007 (no. 38 on full list) called - how to move an object on a irregular looping path - I think it will help with what you want :)

that doesn't use dummies though so can't easily be adjusted

in one of the example tracks there is a complicated version for irregular movement that uses dummies as waypoints that can be easily moved

Mister_Leroy
05-12-2014, 01:39 PM
And if you have any questions about the setup, just ask.

I could quiz you on this for hours my friend. Trying to work out how your set up pictured actually works and plots a non linear path. I'll keep looking at it for now, but I will certainly avail of your kind offer of Q&A as and when I get stuck. :)

IImayneII
05-12-2014, 02:09 PM
I could quiz you on this for hours my friend. Trying to work out how your set up pictured actually works and plots a non linear path. I'll keep looking at it for now, but I will certainly avail of your kind offer of Q&A as and when I get stuck. :)

The idea is that the object moves from dummy object to dummy object. (those at the top of the first screenshot)

So you can place them where you want the object to go, and easily adjust it a bit. The linear vectors make the movement from one dummy object to another, so there are 3 movements that follow each other. (1-2, 2-3, 3-4) (total of 4 dummy objects)

The left column is the impulse (interval trigger is disabled after 1 tick) to turn on/toggle the different movements, so if the object went from (1-2) it stops that movement setup (curve vector and interval trigger) and starts the other one (2-3)

To easily adjust the time of the curve/delay impulse wich should be the same (as when the curve stops it should trigger the next movement) I connected the curve duration and delay time of the delay impulse to one data card where you can easily change the time and you have to do it only once.

All curve vector data's are linked to a set vector event that change the value of the "default" vector that is connected to the OPE. So the set vector event, uses the value of one curve data source to change the default vector, if one movement is done it changes to the next one and then that one changes the value of the default vector if that makes any sense.

Also make sure all interval triggers are set to 1 tick for the interval (except the one in the left column because that one should disable after 1 tick so it doesn't matter) You can also leave the trigger in the left column out of the setup and just use the select even/filter option from the state event on the right (where it all starts) to give the impulse to the state event where the interval trigger points to (and even leave that state event out and use the first one to turn everything on). But I tought that would just make it more complicated to see how it works...and I'm probably just confusion you more now :D

IImayneII
05-12-2014, 02:18 PM
I could quiz you on this for hours my friend. Trying to work out how your set up pictured actually works and plots a non linear path. I'll keep looking at it for now, but I will certainly avail of your kind offer of Q&A as and when I get stuck. :)

What do you mean with non linear path? That movement on the axis is not same? So if it moves from point A - B it doesn't follow a linear path, for examples goes up faster then it moves to the right?

Because yeah, the setup I gave you is more for a linear path from Dummy object 'A' to Dummy object 'B'.

If you want to have it non-linear you will have to change the vectors for regular curve date sources so you can adjust the movement seperatly for each axis. So instead of 1 vector curve data source, you will need to use 3 regular curve data sources wich you can adjust seperatly. I was making that setup first but I tought this setup would be less confusing as there are less events you need. If you want I can make you a screenshot of the other setup too...

BMXBandit777
05-12-2014, 02:25 PM
that doesn't use dummies though so can't easily be adjusted

True but there's still a load of great stuff in there to help people new to the editor :)

Mister_Leroy
05-12-2014, 02:50 PM
What do you mean with non linear path? That movement on the axis is not same? So if it moves from point A - B it doesn't follow a linear path, for examples goes up faster then it moves to the right?

Because yeah, the setup I gave you is more for a linear path from Dummy object 'A' to Dummy object 'B'.

If you want to have it non-linear you will have to change the vectors for regular curve date sources so you can adjust the movement seperatly for each axis. So instead of 1 vector curve data source, you will need to use 3 regular curve data sources wich you can adjust seperatly. I was making that setup first but I tought this setup would be less confusing as there are less events you need. If you want I can make you a screenshot of the other setup too...

It's ok man, really. I will need to get my head around this set up before I dive deeper. My end goal is to have something move around a path, looped or not, but with more than one point. EG:

http://i.imgur.com/EKdMQaZ.png

The points here are, for this example, from a birds eye view.

The dummies are ideally also at different heights, and yaw would be something I want to affect during the animation ultimately, but for now am trying to settle for just moving them along those lines. I assume getting the arc in would be pretty hard work :( by arc I mean:

http://i.imgur.com/qYBVEdv.png

//edit// I've just seen your 2nd post above, I'll have a read of that now :)

SparkierJoNESZ
05-12-2014, 03:04 PM
in that case https://docs.google.com/drawings/d/1yHZLVnnMLdAPCCxk1gHJ6Pi6zFmGEVxGiybyJmnAkYY/edit this might be easier and will immediatly look "natural"

it has the downside that its not very easy to adjust afterwards because everything in the chain that commes after the adjustment will be affected
besides that its pretty easy to add stuff to and changing directions, but harder to lead to specific locations

dasraizer
05-12-2014, 04:06 PM
from a page back, moving an object along a curved path is quite simple:-

use 3 dummy objects for positions A B C
A is the start point of your animation line, this is the start dummy objects position
B is a curve control point, this dummy objects position creates the curve amount
C is the end point of your animation line, another dummy objects position

3 curved data sources set up
inside the the 1st curved data source, point the start to A and the end to B
the 2nd point the start to B and end to C
the 3rd is where the magic happens, point the start to the 1st curved source (A->B) and the end to the second (B->C) with all the timings set the same (length+duration) you will create and curved line from A->C

point the OPE XYZ (not local) to the 3rd curved data source.

it is also doable to add an extra control point in the curve, this helps when you have many point paths to follow.

IImayneII
05-12-2014, 04:07 PM
Yeah from what you want to achieve it looks like it might be easier with local movement and turning the object while it moves forward. I think the link sparkierjonesz gave you would be the easiest setup for that. Maybe I'll try a basic setup of what you want to do later tonight and post it here. But from what I see that link explains it pretty good. Only problem I can see with the setup is it might become rather complex when you want to do alot of movements like up/down too. But then again, what I said will make it not that easy either, but like on my setup, if you can make a function out of the arc you want it shouldn't be that difficult either to adjust the numbers to that.

dasraizer
05-12-2014, 04:20 PM
what about a plane on a string method? using a glue object and 2xdummy objects to create the line part of the path... hmm explaining much badness

object O-----+ O=object +=glue

path A-----B

1) start at A and move to B
2) at B rotate 180
3) move back to A
4) rotate 180, rinse repeat
this could use local and global, save calculating angles etc

IImayneII
05-12-2014, 07:16 PM
what about a plane on a string method? using a glue object and 2xdummy objects to create the line part of the path... hmm explaining much badness

object O-----+ O=object +=glue

path A-----B

1) start at A and move to B
2) at B rotate 180
3) move back to A
4) rotate 180, rinse repeat
this could use local and global, save calculating angles etc

This will actually be alot easier to set up. I don't think you need to rotate at a specific point tough. You can probably move it globally from A-B and then simultaneously rotate the object locally 360 degrees with the time to move from A-B-A the same as rotating 360 degrees.