Getting actor to "wiggle"
jakemiller13
Member, BASIC Posts: 2
Hi all,
Pulling my hair out here as I've been trying to get this to work for days. How can I get an actor to wiggle back and forth?
What I'm trying to have happen is a fish move across the screen in a wave pattern. My thought was to give it forward motion as one behavior, and then have conditionals that trigger it to Rotate to Angles back and forth when it reaches certain extremes (+/- 45 degrees). No matter what conditionals I give it, I can't get it to rotate back and forth. I've tried many combinations of Rotate to Angle, Rotate, Loop (not supposed to work with Rotate anyways).
Any ideas? Thank you!
Comments
"What I'm trying to have happen is a fish move across the screen in a wave pattern"
Constrain X position to A
*
sin(game.time*
B )+CC is the centre point of the movement, A is the extent of the movement in pixels, B is a multiplier to speed up or slow down the movement.
You can also use a sine wave to rotate an actor.
Constrain Rotation to A
*
sin(game.time*
B )A is the extent of the rotation in degrees from 0°, B is a multiplier to speed up or slow down the rotation.
Oh my god, of course! I didn't think about using an actual sine function. Thank you!
God is capitalized. Also please don't use His name in vain. Thanks.
..
Hmmm...
Follow us: Twitter - Website
@AllMyGSHomies I didn't mean to offend anybody. Just trying to lighten the mood.
I used to take hard life stuff (like religion) very seriously. I've learned there's value in being able to poke fun at myself and just relax a bit.
Lol, sorry chump but I will use "his" name in any manner I choose to. You're welcome
Sorry, it was not my place to bring it up. Please forgive me. I wish you luck and hope you turn to the Lord. Please close this thread.
You're right, it wasn't your place at all. Your comment was unwarranted, off-topic, and served no positive purpose.
I'll consider granting you my forgiveness, only AFTER you stop 'hoping' that I 'turn to' your deity.
Frankly, you owe an apology to @jakemiller13 for hijacking his post, and you have no right to ask for this thread to be closed.
@jakemiller13 You've just learnt how easy it is to get in trouble around here... and having fun is not permitted, but we do it anyway. >:)