Angle Equations

0 favourites
  • 5 posts
From the Asset Store
3D Car Pack 1
$2.99 USD
3D models + Rendered Low-Poly Cars in isometric, top-down, and side angles.
  • I'm wondering if anyone knows an equation that can basically make this happen:

    <img src="https://dl.dropboxusercontent.com/u/28104568/Rotation.png" border="0" />

    I have 2 objects (one behind a sprite, and the other in front) with 2 different origin points. I want to be able to rotate the right one to the mouse.x/mouse.y position at all times, while keeping the end of the left object always under but not sticking through the right object (see FIG 3).

    The origin points can NOT change due to tons of other code utilizing this method. I'm wondering if I can set the left object's angle using an equation based on the right arm's angle that will change when rotating a 180 arc (from 270 to 90)

    Any help would be greatly appreciated!

  • can you modify the images to show a representation of the main sprite these 2 are following? I'm having a hard time visualizing exactly what you are trying to do.

  • Are you required to have any minimum angle between both objects?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you OK with one of the arms changing length? Because that will have to happen.

  • Are you OK with one of the arms changing length? Because that will have to happen.

    I think you're right, Sqiddster. I'm going to try extending the left sprite's length and setting the angle to an image point on the right sprite.

    Thanks for the help!

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