I'm trying to get the physics objects to sync up to an image that I'm sending from point A (2300) to B (3400) using flux to emulate said curve, as shown below:
Code: Select all
flux.to(positionHoldingTable[currentObject], 12, {x = 3400}):ease("cubicin")
I cannot figure out what I could be doing to emulate the same behavior using setLinearVelocity (which is the only behavior I can use to allow proper collisions in my situation). I've toyed around with finding the percentage that the above flux-modified image has moved towards its goal and applying that to the linear velocity (which I assume is the correct approach), but I'm unable to find the correct values.
If it'll help, my current (and rather un-optimized/not fully working) code is here: http://pastebin.com/qeTfSM4G . If something should be defined, just let me know and I'll get back to you as soon as possible. (one notice, "movement" is not defined in the included paste)
Edit: Here's a gif of the situation. The white partial-box should be synced to the truck in the same position. The truck is an image, the boxes are a physics object which have the fill debug thing on: Thanks for reading, and I appreciate any help that can be offered!