How can i create a pivot point
i tried in several ways with sin, cos and vector to angle and all other things, but i couldn't create something that worked well.
so i wanna realize something like this
http://i48.tinypic.com/sqs4nm.gif
i saw wild runner from utopian games that have something like this. Anyone know a smooth and really functionable way to do this? Thanks a lot
so i wanna realize something like this
http://i48.tinypic.com/sqs4nm.gif
i saw wild runner from utopian games that have something like this. Anyone know a smooth and really functionable way to do this? Thanks a lot
Best Answers
-
JohnPapiomitis Posts: 6,256
-
RThurman Posts: 2,881
Look in the new section of gamesalad dashboard. Search for a demo I put on there called "OffCenterRotation". Its got all the cool stuff you want. Make an actor pivot till it till the cows come home!
Answers
If i create another object that send it position on the scene, to 2 global variable X e Y, so the actor that have to rotate take the scenex and y from this offset actor, can it work???then i've to create N variables for N actors. :S
Please download the following file:
http://www.mediafire.com/download.php?qn1f15f9stbla54
In this version, all you need to do is pop your graphics into the prototype. Then open the prototype and specify the x and y offset of the actor's rotation point. That is done in first two behaviors.
The x and y offsets are local to the actor. (Think of the actors center as the 0,0 point. Then find how many pixels from the center the rotation point needs to be.) For example, the prototype currently has its x offset set to 25 (which would put the rotation point to the right of center by 25 pixels). And the y offset is set to -60 (which would put the rotation point down from the center by 60 pixels) The point 25, -60 would be in the lower right secton of the actor.
Then you can drag of the actor to any location of the screen and it will work for you.
Hope this helps!
RThurman
Personally, I can hardly wait for joints to be implemented in GameSalad so this kind of workaround isn't needed.
RThurman
However, the problem is in using constraints to create the joints. In the current version of GameSalad, the use of constraints to 'join' several joints severely bogs down the system. For example, to make a simple ragdoll figure (with all the joints working correctly), the update rate drops to under 30fps. I am hoping that a future version of GameSalad will integrate box2D's joints capability directly into the engine so that it will be optimized for higher frame rates.