Move, Rotate, Scale By

I've got an issue with the "Move, Rotate, Scale By" action sequence. I'm trying to use that to simply move a box by 2 cm to left and move it back by -2cm. But each time the movement cganges and instead of having the box in it's first plac, it gose slightly back and back and back. It seems like movig 2cm to left but comeing back by 2.1 cm wichi is odd!
Dose anyone have the same issue?

It might be helpful if you post your code, so someone may be able to spot where the 0.1cm error is coming from.

I'm expecting that your second animation is starting just before the first has ended.


Try using the AnimationEvents.PlaybackCompleted Event before firing the second animation if you're not already. Otherwise if you're calculating based on `entity.position`, then adding or subtracting 2, instead you could save the starting position so the entity moves back to there instead.



PS I'm assuming you're using move(to: Transform), rather than anything else, as move(by:) doesn't exist in RealityKit.

Move, Rotate, Scale By
 
 
Q