Angle Equations

Get help using Construct 2

Post » Sat Aug 03, 2013 5:15 am

I'm wondering if anyone knows an equation that can basically make this happen:



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!ome6a17172013-08-03 05:17:45
B
27
S
5
Posts: 472
Reputation: 2,502

Post » Sat Aug 03, 2013 7:52 am

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.
B
5
Posts: 26
Reputation: 277

Post » Sat Aug 03, 2013 2:10 pm

Are you required to have any minimum angle between both objects?
B
27
S
10
G
10
Posts: 96
Reputation: 6,557

Post » Sat Aug 03, 2013 2:59 pm

Are you OK with one of the arms changing length? Because that will have to happen.
B
92
S
30
G
24
Posts: 3,191
Reputation: 32,584

Post » Sat Aug 03, 2013 11:04 pm

[QUOTE=sqiddster] Are you OK with one of the arms changing length? Because that will have to happen.[/QUOTE]

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!
B
27
S
5
Posts: 472
Reputation: 2,502


Return to How do I....?

Who is online

Users browsing this forum: AekiroStudio, Congrats2u and 8 guests