Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: BlanketsWilson on March 09, 2017, 11:20:53 AM
-
Hey what's up, so I just downloaded PlayMaker today.
The main mechanic in my game is to being able to rotate the world clockwise/counter clockwise 90 degrees at a time, using keys.
As if you press the Q key and the world rotated CW once, stayed still, until that button is pressed again, or the E key is pressed to rotate the CCW. Similiar to how FEZ works. Being able to rotate left and right, however many times.
How is this possible?!
Thanks,
-
Its possible. First I would suggest watching some of the playmaker tutorials to get the hang of playmaker.
1.
Make a variable float, set it to 0. Thats your start rotation.
2.
Then use the "get key down" action, to move to the next state. Assign it to be Q. In the next state, use the "float add", and add 90 more to that variable.
3. Use a "get key down" for E. Use it to "float add" in another state. But this time use -90. (Float add, both add or subtract).
4. Decide how you will move the world. But probably easiest is make an empty game object. Maybe call it "whole_world". Then you just rotate this gameobject and everything that is a child will change too.
5. You can use an itween action or the regular rotate action in playmaker. So the rotation to be your variable. Set the rotation action to work on your new "whole_world" game object. And the rotation amount to be your variable. Viola.
If you have watched the first few tutorials, this will all make sense. At the very least, this first one:
-
Its possible. First I would suggest watching some of the playmaker tutorials to get the hang of playmaker.
1.
Make a variable float, set it to 0. Thats your start rotation.
2.
Then use the "get key down" action, to move to the next state. Assign it to be Q. In the next state, use the "float add", and add 90 more to that variable.
3. Use a "get key down" for E. Use it to "float add" in another state. But this time use -90. (Float add, both add or subtract).
4. Decide how you will move the world. But probably easiest is make an empty game object. Maybe call it "whole_world". Then you just rotate this gameobject and everything that is a child will change too.
5. You can use an itween action or the regular rotate action in playmaker. So the rotation to be your variable. Set the rotation action to work on your new "whole_world" game object. And the rotation amount to be your variable. Viola.
If you have watched the first few tutorials, this will all make sense. At the very least, this first one:
Thanks for the reply. I'm pretty confused on how that would get set up using the nodes. Is there anyway you can set this up in a demo file. Basically, everything you said is what I need.
It would mean a great deal, and I appreciate it.
-
Sorry, I dont have time to do it for you. Keep trying, you will figure it out ;)
-
Hi,
Let me know if you still struggle with this, I'll do a quick demo of this so you can get started.
Bye,
Jean
-
Hi,
Let me know if you still struggle with this, I'll do a quick demo of this so you can get started.
Bye,
Jean
that would be great, thank you!!!!!! :) :) :)
-
Hi,
Here we go:
(http://i.imgur.com/JjsVs3K.gif)
let me know if you understand this, basically the trick is to use proper tweening, in this case I went for rotateBy which is a percentage of the rotation, hence why I use 0.25 value, it's a quarter of a full turn.
Let me know if that's what you wanted to achieve? replcae the cube with your world root Object and everything is going to rotate.
Bye,
Jean
-
Hi,
ok, and the sample is now on the Ecosystem:
https://twitter.com/JeanAtPlayMaker/status/847705218993143808
Bye,
Jean
-
Hello,
I know this post is old, but hopefully someone will respond. I'm having a hard time getting this to work. Here r my FSMs. Hopefully someone can help. Thanks!
-
Here r more pics (they would not fit in one message)
-
Hi.
I noticed 'loop don't finish is checked'.
maybe that's the issue
-
Nope. Didn't seem to be the issue. Also, I noticed I forgot to put in one of the keys, but that still wasn't the problem. Any other ideas?
-
Hi.
If you play and look to the fsm, can you see it looping thru the states?