Maximum rotation

This forum is currently in read-only mode.
  • Hello guys, I'm new here, but I know Construct Classic since 3 months,

    So, I'm actually doing some tests, with the "platformer" of Construct Classic, I have a player that's divided in 3 parts: body, arms, legs, so the "arms" follow the cursor but they follow everywhere... So I've a question:

    -How to block the rotation in a certain value ?

    I mean, I want to block the arm rotation when the cursor is on the sky, so that the player can't rotate completely (360?).

    Like this:

    <img src="http://img11.hostingpics.net/pics/240083Areas.png" border="0" />

    Thanks for your help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ordinarily you would use clamp(angle,lowangle, highangle), but that wont work as you would have zero in between low and high, and it would go clockwise, rather than what you want.

    A work around would be to change the image angle so that what you see is offset by your limits. You should be able to do that in the image editor.

    So rather than have clamp(angle, 45,315), you would use clamp(angle,0,90).

    Keep in mind that is only for when facing right, you will need another image, and new rules for facing left.

    Changing frames of the image should solve that.

  • Err...

    You mean like that:

    <img src="http://img11.hostingpics.net/pics/951819angles.png" border="0" />

    ?

  • The big help was in my image, but I don't saw it...:

    <img src="http://img11.hostingpics.net/pics/590284areasolution.png" border="0" />

    The solution is pretty stupid but it's works for me.

    <img src="http://img11.hostingpics.net/pics/400025seriously.png" border="0" />

  • Whatever works for you.

  • Thanks for your help anyway ! :)

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