Page 1 of 1

Arrow follow arc

PostPosted: Tue Dec 04, 2012 10:00 am
by SigmundO
Hello. I got an arrow shot out by a physics impulse moving in a nice arc. But the arrow's rotation does not follow the arc. How do I set the continous rotation of the arrow so that it is more "lifelike"?

Re: Arrow follow arc

PostPosted: Tue Dec 04, 2012 12:12 pm
by Whiteclaws
Why not shoot a circle and attach to it an arrow sprite

Re: Arrow follow arc

PostPosted: Tue Dec 04, 2012 12:21 pm
by sqiddster
I'd probably not recommend a circle, as projectiles should follow a parabola.

However, I know an easy way to solve your problem.

Set arrow angle to:
angle(0,0,arrow.physics.vectorX,arrow.physics.vectorY)

Let me know with @sqiddster if that doesn't work.

Re: Arrow follow arc

PostPosted: Tue Dec 04, 2012 2:01 pm
by SigmundO
[QUOTE=sqiddster] I'd probably not recommend a circle, as projectiles should follow a parabola.

However, I know an easy way to solve your problem.

Set arrow angle to:
angle(0,0,arrow.physics.vectorX,arrow.physics.vectorY)

Let me know with @sqiddster if that doesn't work.[/QUOTE]

Thanx! This seem to work.