jvdbeek's Forum Posts

  • 1 posts
  • Your weapon sprite's graphics (sprite22) are drawn with its top upwards. In Construct the top of things should point towards the right if you want to use methods that use the angle like the 'rotate towards' method and make it behave as expected.

    Construct will try to set the angle of any object tied to the bone behavior at every tick, so you'll have to set the angle to what you want to point it at instead at every tick as well.

    I've rotated your weapon and added a sprite target cursor that you can move with the arrow up and down keys. At every tick, Construct will make the weapon point toward the target. You can get the .cap here.

    EDIT: Seems like I misunderstood you earlier. You wanted the weapon to rotate smoothly towards the minimum and maximum aim angle and back to zero if no key was pressed. After some experimentation, I've made a solution that does that. It's a bit hard to explain how, so just have a look at the .cap.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1 posts