Separating angle of sprite and imagepoint.

0 favourites
  • 2 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • I'm manually setting the frame of my sprite according to the direction of movement, but in order for my bullets to spawn according to the frame, I have to adjust the angle of the imagepoint. The only problem is: I can't seem to do this without changing the angle of the frame!

    So: Any way to separate the angle of the sprite and the angle of the imagepoint?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nope.

    You can, however, instead of an imagepoint, store a position using instance variables.

    if you give the sprite two extra instance variables and name them, for example: "pointX" and "pointY"

    +everytick

         -> set sprite.pointX to sprite.X + cos(B)*C

         -> set sprite.pointY to sprite.Y + sin(B)*C

    Where B is the desired angle of the point from the origin, and C is the desired distance of the point from the origin.

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