Max Angle Platformgame

  • Hello,

    I used the "Set angle toward" action to my mouse, its working but I want a max Angle for the Rotation of the sprite between 60 and 300 degrees, so I can move my mouse more than 60 or 300 Degrees but the Sprite, doesnt rotate anymore only if my Cursor turns back in the are of movement...

    Sorry for my bad english.

  • Hi, you could make a new sprite "HelpSprite", and set it to invisible in the property window. Then make two events like this:

    Every Tick:
    [ul]
    	[li]> HelpSprite: Set angle toward (Mouse.X, Mouse.Y)[/li]
    	[li]> HelpSprite: Set position to YourSprite[/li]
    [/ul]
    HelpSprite is between 60 and 300 degrees:
    [ul]
    	[li]> YourSprite: Set angle to HelpSprite.Angle degrees[/li]
    [/ul]
  • 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, it works pretty...

    <img src="smileys/smiley32.gif" border="0" align="middle" /> <img src="smileys/smiley32.gif" border="0" align="middle" />

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