How do I change the direction of my bullet without changing the angle?

0 favourites
  • 8 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Hello! I am wondering if it's possible to change the direction of a moving object without changing the angle, because I'm trying to make a infinite runner except it's in a side-up kinda perspective, like this

    Is it possible?

    Edit: The thing I'm trying to move is the platforms btw!

  • Yes the bullet movement angle is separate to the object angle. If you uncheck the box 'Set Angle' on the bullet behaviour then it will move on its own angle of motion without changing the object's angle.

  • Yes the bullet movement angle is separate to the object angle. If you uncheck the box 'Set Angle' on the bullet behaviour then it will move on its own angle of motion without changing the object's angle.

    Thank you very much!! :D

  • Hi, an additional tip, you can/should separate your player from its graphics, so you can have the actual player which is an invisible sprite doing all the things/behaviors you need and pinned on it (+ container) are the graphics sprites (can be multiple) which can do different things than the player invisible object.

    Best of luck,

    COSMOS

  • Hi, an additional tip, you can/should separate your player from its graphics, so you can have the actual player which is an invisible sprite doing all the things/behaviors you need and pinned on it (+ container) are the graphics sprites (can be multiple) which can do different things than the player invisible object.

    Best of luck,

    COSMOS

    Ooh that sounds complicated! Is there any tutorial on it?

  • > Hi, an additional tip, you can/should separate your player from its graphics, so you can have the actual player which is an invisible sprite doing all the things/behaviors you need and pinned on it (+ container) are the graphics sprites (can be multiple) which can do different things than the player invisible object.

    >

    > Best of luck,

    > COSMOS

    Ooh that sounds complicated! Is there any tutorial on it?

    probably somewhere it exists, but it really is not complicated, here a simple example:

    say you have a running character for a platform game, so 1st you create an invisible rectangular sprite which is the PLAYER which will have the running / platform behavior and anything else that you need to happen to it such as LIFE, collisions, etc.

    since is it a simple square/rectangle you will never have collision problems and everything will be clean

    Now to see the player you have the running animation in a separate sprite called say PLAYER_Graphics with only PIN behavior maximum. This only exists to show the player and also allows you to switch him with another player graphic as many times as you want super easily since you are not touching the "real" PLAYER

    To stick the graphics on top of the PLAYER you have 2 easy options:

    1) At start of layout PIN behavior on PLAYER both position and angle

    or 2) Every tick, set position to PLAYER.X PLAYER.Y

    That way your PLAYER is separate from the graphics and allows you to both have cleaner collisions / movement while also allowing you to change graphics any time you wish.

    Hope that helps,

    Cheers,

    COSMOS

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ooh that sounds complicated! Is there any tutorial on it?

    It's a very common trick used in many games, and it helps to avoid lots of issues caused by changing player animations.

    There are lots of tutorials, here is the first one I found, read the first page:

    construct.net/en/tutorials/building-a-platform-game-a-beginners-guide-115

  • Thank you both! I will look into this more!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)