How to pin to two objects at the same time ?

Get help using Construct 2

Post » Sat Nov 24, 2012 8:02 pm

Here's a design problem I want to solve the simple way.

To illustrate it, imagine I have a Sprite named "triangle".

On one vertex, I pin a tiny Sprite. I pin another tiny Sprite on another vertex.

What I want is that if I set the position of one of those tiny Sprite, the pinned triangle follows it in place. Furthermore, I want to set the position of the other tiny Sprite, and be sure that the previous tiny Sprite is still there as a constraint (making, for example, the triangle rotate around it to respect both constraints).

I don't want to code something like an Inverse Kinematic plugin to solve those constraints. Is there an easy way to do without it ?
Is there a way to pin an object to two other objects at the same time ?
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sun Nov 25, 2012 1:37 am

Have you tried using more than one imagepoint?
B
20
S
4
G
2
Posts: 124
Reputation: 2,482

Post » Sun Nov 25, 2012 4:54 am

Try this :)

https://dl.dropbox.com/u/108799982/Capx%20Demos/Pinning.capx

It rotates when you click right mouse and you can drag the blue one with the left. Also the blue square is bound to the game space
Using R238 for all examples
B
60
S
17
G
6
Posts: 363
Reputation: 9,125

Post » Sat Jan 19, 2013 8:49 pm

Thank you very much for the pinning example!!
B
11
S
3
G
3
Posts: 79
Reputation: 3,343


Return to How do I....?

Who is online

Users browsing this forum: CavalierBubble, Evanetot and 24 guests