Hey guys, I got a question for you. In my TOTB 3 entry Break For It! I have a shark that constrains to the y position of the turtle. However I would like for it to have a little bit of a delay instead of moving perfectly with the turtle. You can see what I mean here at about 2:50:
Comments
Couldn't you just encase a change attribute in a timer? Have a timer change the y position every .5 sec (or whatever works). I would think it would work like a "delayed constrain".
BTW, very nice graphics. The whole atmosphere just seems... right. Except your TOTB entry is actually inside a box. :P
That would work however it makes the shark all jumpy rather than smooth...
And then add another interpolate with an ease out for the reverse. Play with the variables to get the feel you're looking for.
Then constrain another invisible actor to the shark's x,y to act as the collider.
It's adding another actor, but since it's immovable and only using interpolate for y positioning, it's not resource heavy.
I've been using this technique for the game I've been working on for the past few months and it's a nice effect.
I'll have to play around with that. It's a definite brain fart day. Thanks!
If you find something nicer be sure to let me know. I've played around with quite a few different techniques but so far I haven't found anything that feels more natural than this.
Would you mind sharing how you made the turtle lurch forward, then return to its position? Did you use interpolate? Were you adjusting linear velocity, or linear position? (I'm guessing your background moves, not your turtle). Thanks
Cheers,
Ludwig
Lump Apps and My Assets
Sure, It was quite easy actually. All I did was change the X velocity to something like 300 then put a timer after 2 seconds (or something like that) Change velocity to 0 and interpolate back to inital X for 3 seconds.
My player-actor flies left and right and this gives a nice delay when you turn around because the enemy needs some time to decelerate and accelerate into the opposite direction.
You can use this but then only for the y axis.
Hope this helps.
Lump Apps and My Assets
Lump Apps and My Assets