Object move in the direction its facing

Is there a way to make an object move in the direction its facing?

Could you give more context… Are you talking about a top view game? or a side view?

I am doing it from a side view. Where you aim an arrow and it fires but I’m not sure how to make it fire in the direction its facing.

Do you have a wick file so I can help you better?

I think this should give it to you:
https://drive.google.com/u/0/uc?id=1GLn5GZgk_EsYobzlmfgfhfeEj28k-Jzq&export=download

Try this…

I’m still not quite sure how to make it go in the direction its facing

you know your bow rotation so the arrow will start with the same rotation
Wick will provide you the value of the angle in degree
Now you want to know how much to add to x,y to have your arrow move so:
xIncrement=arrowSpeed * Math.cos(yourArrow.rotation * 0.01745);
yIncrement=arrowSpeed * Math.sin(yourArrow.rotation * 0.01745);

note that you have to transform the angle from degree to radians (approx *0.01745) to make it work
arrowSpeed is any value you want to start with

1 Like

thanks i got it working now