Trying to make a actor rotate left to right-.-
I am trying to figure out a way to have a actor rotate to a certain degree and then when it hits that point it rotates back up. And repeats again. I want to see if there is a simple way to do this without burning through alot of code to do it also. Thank you guys!
Comments
Constrain the actor's rotation to this:
20*sin(self.Time*100)
The '20' is the angle it will rotate each way from 0° . . . (so in this example it will rotate 20° to the left and then 20° to the right and then 20° to the left . . . . etc etc etc)
The '100' is the speed of the rotation.
Adjust to suit.
Nice job.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Constain Attribute: self.Rotation To sin(20)self.Time*100
IS this right?!
This is what you have: sin(20)self.Time*100
This is what I posted: 20*sin(self.Time*100)
http://www.mediafire.com/?70hx5xw9cswxf11
http://en.wikipedia.org/wiki/Sine
+ search Youtube for videos on Sine + Cosine basics.