Set angle to mouse.x, mouse.y

0 favourites
  • 3 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • I am having a very strange problem.

    I have a turret which has one event for aiming: set angle towards position mouse.X, mouse.Y.

    This works well. Most of the time. Sometime however, I get a strange glitch where it SORT of points towards the mouse, but not quite. Obviously this is a game breaking bug but it is not my code as there is only one event for aiming. Just to make sure, I made another object (the yellow thing) with two events: one to set position to the tank, and another to set angle towards (mouse.x, mouse.y). Same problem.

    <img src="" border="0" />


  • Are you sure you're not slightly scaling or parallaxing any layers? If so remember to pass the layer to the expression (e.g. Mouse.X("Background")) to get the mouse position for that layer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ahhhhhh...

    I am scaling a layer, indeed. Thank you.

    EDIT: Oops! It seems that I have uncovered a real bug! Adding these properties to my mouse expressions means I get nothing but a grey screen at runtime.

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