How do I rotate and move an object to front in the same time

Get help using Construct 2

Post » Wed May 25, 2016 3:09 am

I wanna move and rotate my sword (sprite) to front, i tried put the rotate behavior in the sword, but the sprite moves to the side, how can i move to front and rotate in the same time my sprite without going to the side? Help me :(
B
15
S
6
G
1
Posts: 22
Reputation: 1,673

Post » Wed May 25, 2016 8:29 pm

if its pinned to your hand? perhaps it is set to position and angle, just position should do fine.
give it a Boolean, when attack pressed, Boolean true

... you could use the rotate function, but use a separate event to stop rotation when it reaches a certain angle (like player angle +60), then reset it to player.angle and reset boolean.
If your sword has physics, it may be why its pushing the player.

else just give the sword an animation so it appears to rotate :) hope its useful,
B
9
S
3
Posts: 102
Reputation: 987

Post » Thu May 26, 2016 12:33 am

Aher0 wrote:if its pinned to your hand? perhaps it is set to position and angle, just position should do fine.
give it a Boolean, when attack pressed, Boolean true

... you could use the rotate function, but use a separate event to stop rotation when it reaches a certain angle (like player angle +60), then reset it to player.angle and reset boolean.
If your sword has physics, it may be why its pushing the player.

else just give the sword an animation so it appears to rotate :) hope its useful,

I think you understand wrong, my character is like throwing the sword, and i want that the sword rotates and move front in the player's angle to kill the enemy :)
B
15
S
6
G
1
Posts: 22
Reputation: 1,673


Return to How do I....?

Who is online

Users browsing this forum: ST314 and 23 guests