[SOLVED] Weird angle() behavior(that wasn't weird)

This forum is currently in read-only mode.
  • So here's one for the experienced among us:

    DOWNLOAD

    It runs with fixed 1 fps on purpose. Run it and press 'space', until the text in the lower right changes to "Press 'space' to stop". (Be patient because of the low framerate)

    You will now see that the angle of the circle of instances swaps 180? per frame. But there is no code telling it to.

    It seems, that angle() reports two different angles on every other frame. Can you confirm this?

    <font color="orange">*Fixed URL to be a nice link^^ <3 Sol</font>

  • It's working as expected, switch the order of the parameters of angle() and it won't flip every frame.

    ex:

    angle(400, 300, .X, .Y)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much ROJO! Works now.

    Now there's one thing, I don't understand. Shouldn't the angle keep the same (reversed or right), if it is calling angle() with the same order on every frame?

    I mean, the angle from center to x/y might be 10, then angle from x/y to center would be 190?. And that should be true for every frame, no?

    EDIT: So it should just swap the angles once the first time it is called wrong.

  • Yes, but with the reversed angle the sprites are moved to the opposite side each frame.

  • Thank you ROJO.

    That was one of the issues, we call 'den wald vor lauter b�umen nicht sehen' in germany. I believe it is translated to 'seeing the wood for the trees'...

    /me feels dumb right now^^

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