TypeScript: Move object over time

I am using TypeScript to make an object rotate over time, or move over time, with translateLocal.

The CoBlock equivalent has a “time in seconds” parameter which lets you specify how long it takes for the move to complete.
However, this does not seem to be the case for TypeScript.

How can I tell the translateLocal method to take X seconds to complete the move?

Hi @24dlau,

You need BaseItem.transition.moveBy().

Hope this helps! Let me know if you have any further questions about this. If this solves your issue, please mark this post as the Solution.

Many thanks,
Geoff @ TechLeap

Thank you, this helped!

In the end, I ended up using BaseItem.transition.rotateLocal because my action involves rotating. Thanks for the answer!

1 Like