actor rotate problem
feroman
Member, PRO Posts: 130
An iron bar remains fixed, but shall rotate on same!
from the beginning of the scene, the actor turns 15 ° opposite hand of a clock (for example) and then returns to show direction of 345 ° or 30 °.
code below.
Uploaded with ImageShack.us
this works, but only once.
I want this bar is rotated 15 ° and -15 ° continuously.
How? behavior with the "TIMER" does not work as I want.
Help me!
from the beginning of the scene, the actor turns 15 ° opposite hand of a clock (for example) and then returns to show direction of 345 ° or 30 °.
code below.
Uploaded with ImageShack.us
this works, but only once.
I want this bar is rotated 15 ° and -15 ° continuously.
How? behavior with the "TIMER" does not work as I want.
Help me!
Comments
Change Attribute: self.Motion.Angular Velocity To: 20
Rule: When (Any)
--Attribute: Self.Rotation > 15
--Attribute.Self.Rotation < -15
----Change Attribute: self.Motion.Angular Velocity To: -self.Motion.Angular Velocity
This should get it rocking back and forth between +15 and -15 degrees at a speed of '20'.
During a collision with another object, the bar moves strangely, it does not remain on its original position.
Constrain Attribute: self.position.x To: (your x coordinate here)
Constrain Attribute: self.position.y To: (your y coordinate here)