Is waving, to say hello or goodbye?
smurfted
Member, PRO Posts: 586
I'm guessing the sin function could be used to get an actor waving back & forth. But what if i wanted the motion limited to say 40 degrees of motion, back & forth.
What kind of dark magic (code) would i need to achieve this?
Comments
Check out this thread:
https://forums.gamesalad.com/discussion/69477/rotating-from-a-specific-angle-in-a-pendulum-like-manner-using-only-one-actor
@socks and @RThurman are licensed sorcerers
Can you be any more specific ? 'Waving back & forth' is a little vague, do you mean moving back and forth horizontally (along the X axis) ? Or moving in a circle, or perhaps rotating back and forth by 40° ?
Sorry, rotating back and forth by 40 degrees was what i meant..
Constrain rotation to: 40 *sin(self.time *100)
Also you could use the good old rotate behavior:
speed = 50*sin( self.Time *140)
Uh oh math wizard war.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
There is some crazy simple scary complicated maths going on there. Thank you very much..