Orbiting actor won't face direction they are travelling
micksolo
Member Posts: 264
Hi,
I set up an actor to be "orbiting" using constrain pos x and y to cos and sin functions. It works fine.
Then I added a rule to make the actor face towards the direction it's moving using this rule:
constrains self.rotation to VectorToAngle(self.motion.linear.velocity.x , self.motion.linear.velocity.y)
but this doesn't seem to have any effect, the actor still moves without facing the direction it's moving. any ideas?
I set up an actor to be "orbiting" using constrain pos x and y to cos and sin functions. It works fine.
Then I added a rule to make the actor face towards the direction it's moving using this rule:
constrains self.rotation to VectorToAngle(self.motion.linear.velocity.x , self.motion.linear.velocity.y)
but this doesn't seem to have any effect, the actor still moves without facing the direction it's moving. any ideas?
Comments
What you want to do is constrain the actor's rotation to 90 degres away from the center of its orbit axis.