"Is between angle" behaves strange

0 favourites
  • 6 posts
From the Asset Store
Strange factory themed set of tiles for your platformer game
  • .CAPX

    Try to move with mouse clockwise around "P" Sprite. The problem is: Why first stick stops rotating, even the angle limit is bigger than grey's?!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I works ... but as sprite2 and 3 are tied to sprite.angle/2 (so same value for each) ... sprite begins to move sooner but sprite3 take the same angle/2 a little time after ... when sprite2 stop taking sprite.angle/2 sprite3 continue a little time to move so it works but you must really move slowly to seen any difference as angle range is short between Sprites are allowed moving and not.

    THINK i have understand what you want to do (but i'm not sure)!

    Try this : replace sprite2.angle formula by sprite2.rotate dt*100 clockwise and the same for sprite3 ! and then change in formulas *100 by other values depending on turn speed wanted. At last, use a variable to see if sprite.angle change when moving mouse and how ... and adjust conditions to only rotate spr2 and spr3 when spr.angle change and in "range" of angles.

  • I've renewed my CAPX, look again - I think the problem is that is between angles doesn't work correctly when angle is wider than 180 isn't it?

  • Yeah it doesn't work if the angle range > 180. Looks like a bug.

  • The angles above 180 are negative values. So north would be -90 northeast -45 and so forth up to -180. I saw before a math example to flip that around into how it should be but I can't seem to find it. Anyone know how to flip the negative value into a positive?

  • 360 + negative angle = positive angle

    360 - 90 = 270

    And if you accumulate angle, e.g. 480, use modulo, e.g. 480%360

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