Fast Constrain (LinkMachine v2)

SocksSocks London, UK.Member Posts: 12,822
edited January 2015 in Working with GS (Mac)

Some of you might remember an earlier tool I made for helping people lock objects together called Link Machine (you can see it in action here: http://forums.gamesalad.com/discussion/62202/linkmachine/p1 )


. . . well this new project is a greatly simplified version of the same thing, it's simplified in that it doesn't have an interface, you simply do the linking in your scene, so not only is it much faster to work with but it's entirely interactive.

When set up it works like this . . .

1) Drag your Parent object into the scene.

2) Drag your Child actor into the scene.

3) Move and rotate and size your Child actor however you like.

Done ! They are automatically linked together as one object.

. . . . . . . . . . . .

Here's a video of it in action:

And here is the project:

https://www.mediafire.com/?ccf8bpdwknlop8h

. . . . . . . . . . . .

Behind the scenes:

There are 3 game attributes, which track the x position, y position and rotation of the Parent actor (via three constrain behaviours in the Parent actor).

Then the rest of the work is done in the Child actor, it records its own x and y position and its rotation - then applies a little trigonometry to constrain these values to the 3 game attributes.

Comments

Sign In or Register to comment.