Ok so i started making a new track last week and this track required a bit (a lot i should say) of animation. One of the animations in my track requires an object to move through various different points. This is fairly new to me as the only animation i have done in the past is only a single point to point. I made this piece of logic to get it working (this is probably not the best way of doing it but i was building off the top of my head so yeah).
The problem im having is that when the cube reaches to 2nd length, it jumps near the end. This only seems to happen when my delay is >1000. Anything <1000 works fine. Hopefully this video will show what i mean in a better way.
If anyone could help me fix this problem (prevent the jumping animation) that would be amazing. alternatively if someone could show me a simpler version of doing the same thing that would also be good.
Thanks!<3
it's for if you want to loop the object, but does this help ---> link
It looks like that is using local OPE. that would be far too complicated for what i have in mind. the idea with how i have set mine up is that i can just lay down as many nodes as i want and extend the logic by copy and pasting the bottom section. It works EXCEPT when i want any of the movements to last longer than 1000 ticks.
mmm.. I really don't know, but can't you just take the easy way and don't make any movements longer than 1000 ticks.. If you want to have them longer than a 1000 you can just break them up into fragments.
edit: So what exactly do you want the animation to do? Just go from point A to point B to point C and then it's done? If you just want to do that, you have made it really complicated for yourself.. :P
state event on1---delay filter---state event on/off2
state event1 turns on-- interval trigger and the curved vector datasource(cds)
interval trigger--- ope that is linked to object. The cds gets its global position from an object position info where the start point is point A and the end is point B.
after x.xx seconds the object has moved and delay filter will turn on state event2. State event 2 will turn off the first interval trigger and the old cds and will turn on the new interval trigger and cds(this cds gets its info from point B to point C.
Repeat this for point c to d, d to e, etc..
picture
edit: it's not easily expandable I guess, but it definitely works.
Essentially yes, this is what i want. The reason i made it like this is so that it was easily expandable.Originally Posted by Rishaan Go to original post
Just a little update. I have decided to keep working on my own creation instead of reverting to the more basic (and a LOT more messy) method. I have added a speed equaliser shown in the image below. Im still getting jumping issues when the cube travels from point 1 to 2. movement from point 0 to 1 is flawless. If anyone has any idea im more than happy to live stream (i have been livestreaming the entire map build anyway) to make it a lot easier to see what's going on live.
![]()
I am doing the same thing I think. When the object is within a distance to point B, change it's destination from B to C. Then C to D and so on. I can't see your setup very well, the numbers are blurry in the screenshot, but I'll give it a guess. If your code updates the starting point before the box reaches the next corner, it may be OPE'ing it to that point, skipping all the coordinates in between. I set the starting point of my curve to the current position of the Box, then the end point was updated at each corner. That way no matter where the end point was, the Box would always begin its path from where ever it already was.
For every duplicate, you'd have to set the distance to next corner, and coordinate of that corner. If anyone's ever made moving platforms in a 3D shooter like Quake, Half-Life or Duke Nukem 3D, you may know what I am talking about:
func_plat
Target: Fred
path_corner
Targetname: Fred
Target: Bob
path_corner
Targetname: Bob
Target: Phil
path_corner
Targetname: Phil
Target: Fred
If you wanted the code to be fully auto, I think the closest you can get is to Joint a physical object to the Box, then add an Area Trigger to each corner. This AT would then update the destination Variable Data Source with the coordinates of the next corner. Not fully-auto but only 1 link to draw for each copy, not including travel speed.
I had a crack at this today. From what I understand, you want to move an object from point A to B to C to D,E....and you want to be able to do it without having to copy over logic code for every node, so basically with an object pointer. The goal here is that to add a node, you just have to add a dummy object to the object pointer(s). Here's what I came up with, hopefully the picture makes sense but i'll try to explain step by step how to recreate it.
[IMG][/IMG]
Here's a link to the full size for better viewing: http://i.imgur.com/uT7VdCi.jpg
Steps:
- Spawn an object pointer and 6(or any number you want to start with) dummy objects.
- Target the dummy objects in the object pointer then tie the index value of the pointer to a variable data source set to 0.
- Spawn 2 vector object info datasources and point them to the pointer. Set the first to position and the second to angle(optional if you don't care about angle)
- Now select the pointer, 2 info datasources and 1 variable datasource and copy them. change the new variable datasource for the new pointer index to 1. The idea here is that the first pointer will always be the start point and the second pointer will be the end point.
- Now spawn 2 curve vector data sources, one for position and one for angle. Point the start vectors to the info from the first object pointer and the end vector to the info from the second pointer.
- This is where is starts to get tricky.We'll leave the curve datasources for now because we need to set up other stuff they need.
- We already have the start and end positions/angle but we now need to set the time each animation sector is going to take. Which means we need some object that stores multiple accessible values. That's where the 2 dimensional vector comes in. Spawn one. Set width to 2 and height to 5 (5 because we have 6 dummy objects and hence 5 different animations in between them.) Every row will hold information for a specific node to node animation. The width is 2 because there are 2 properties for every animation we'll be storing here. First, time (number of ticks it will take) and second the curve (ie. linear, quadratic ease in, etc). This is how my 2-d vector looks like: (The curve is represented as an index to the values in the curve data source, starting from 0)
- [IMG]
[/IMG]
- Now spawn 2 get vector datasources and point them to the 2-d vector. Tie their row to a variable data source set to 0. Incrementing this variable data source by one will provide information for the next animation to be done every time. The first get vector should have a column of 0 and the second a column of 1.
- We can now go back to the curve vector data sources because we have all the required info. Tie the curves to the second getvector(the one with column index 1) and the duration ticks to the first getvector( the one with column index 0). Important: Enable 'Reset when disabled' option. Also, disable the curve data sources.
- Now spawn an OPE and an interval trigger. Set the interval trigger to disabled, sending impulses after every tick. Point it to the OPE. Set the OPE to disabled, tie the position and rotation (both global, set rotation checked) to their respective curve data sources and target it to the object you want to move. Leave the reset when disabled options unchecked.
- Now spawn another interval trigger. Enabled, tie the interval ticks to the first get vector (with column index 0). This is because we want this interval trigger to always send an impulse at the beginning of every animation. Send the impulse to a state event (ON) targeted to the two curve vector data sources, the OPE and the first interval trigger we spawned.
- Send the impluse further along to a delay filter. The delay ticks should be the amount of time it takes to do the current animation. We are delaying because after that we want to disable the curve data sources (hence resetting them, and then increase the object pointer indices and the 2-d vector row, ie. move to the next animation. But we want to do this just before the current animation ends so unfortunately one tick has to be sacrificed from the current animation. It's not noticeable. So spawn a 2 input operator, tie the first value to the first getvector(with column index 0) and then set it to subtract and then set the second value to 1. Now tie the delay filter ticks to this operation.
- Send the impulse from the filter to a state event (OFF) targeted to the curve data sources, OPE and first interval trigger. send the impulse further along to a set value event, set to increase and targeted to the three variable data sources(2 for the pointers and one for the 2-d vector).
- And you're done!To add a node, add a dummy object with the rotation and position you want the object to end up with, add it to the object pointers and then go to the 2-d vector and add a row with the animation ticks and curve type index, respectively. That's very expandable without adding any tool cards at all. 22 tool cards in total!
I hope I understood your problem correctly, but what I'm sure of is that this will enable you to move an object from point A to any number of other points, and you have control of the time (hence speed), rotation and curve. I had fun making this and will definitely use it now. Also, I'm still trying to figure out a way around sacrificing that one tick at the end of every animation though its not a big deal since it not even noticeable, even at fast speeds.
hope it makes sense. let me know if you have any questions. I believe with the right placement and rotation of dummy objects, you can create any path with it. It can also be easily modified to create a looping pathOriginally Posted by Jonny Go to original post