gamecherry's Forum Posts

  • here's an interesting problem...the angle restrictions are working fine () as long as the mouse is within the game window. If the mouse cursor leaves the game window through either the top or the bottom the object spins around freely, but not if the cursor leaves the game window through either the left or right side of the screen...weird.

    Anyone know what's going on?

    Thank you for looking.my related postHow to Restrict Movement of Object?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • here's an interesting problem...the angle restrictions are working fine as long as the mouse is within the game window. If the mouse cursor leaves the game window through either the top or the bottom the object spins around freely, but not if the cursor leaves the game window through either the left or right side of the screen...weird.

    Anyone know what's going on?

  • Thank you Squiddster!

    That was driving me nuts. I had the logic down but couldn't figure out the math (I guess I need to pay closer attention in trigonometry class). Of course the angles change depending on the objects direction, but with your template (and the fine education I'm receiving at ITT-Tech), I figured it out.

    You're a life saver - er, better yet - a time saver.

    Thanks again.

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

  • Hello Everyone,

    I am having a problem with an object in my game. I have the objects angle set to Mouse.X, Mouse.Y but I want to restrict the amount it can turn.

    Being set to the mouse means if I move the mouse around the object , the object will turn a full 360 degrees - I don't want that though. I want the object to be restricted to only moving between 320 and 40 degrees (think a pizza with a slice missing. That missing slice is the angle I'm looking for) How is this done?

    Thank you for looking.