Hi all,
I’ve got a platform that is oscillating back and forth in the X axis, which has a BoxCollider2D and a RigidBody2D on it, and I have used freeze position in Z to prevent it from moving when hit by a ball in the scene. I am using RigidBody2D.MovePosition in a script to oscillate it.
I would now like to be able to rotate the platforms parent and have the platform oscillate in the X axis relative to the parent. However using freeze position in Z, and giving MovePosition only an X coordinate (which I believe is global, not local) the platform oscillates in the world X axis at an angle.
Is there a way to achieve the oscillation in the rotated axis?
Thanks in advance,
Andy