I really can’t figure this one out.
I am trying to get my punch to do a semi circular movement in front of the player to simulate a “swing punch”, but it only moves from one side to another, I tried looking at other examples but I just don’t get it.
Could you help me?
As a suggestion, don’t do this:
Instead, use the tween to delete the object:
Also, keep in mind the tween time is milliseconds. You’re tweening is for 0.5ms, not 1/2 a second. You want to tween for 500ms.
The tween you have used only moves the playerPunch object 15 pixels to the right, along the x-axis. To get the punch moving in an upward direction, change the y position.
An arc or swing punch is a bit trickier to implement, though it can be done.
how can it be done? i’m really struggling to understand this concept
also thank you for your tweening advice it was very useful.
You could try to tween the X and Y independently with 2 tween. Probably a Out for X and a In for Y.
BTW, I’ve got the PlayerPunch object being destroyed when the tween has finished playing. It’s a setting when you create the tween.
The above events result in:
that was a very complete answer thank you for your time I really appreciate it
I lost all of this project because I did not save