Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: LuminRabbit on October 07, 2018, 01:06:13 PM

Title: Variable Rotation Speed[SOLVED]
Post by: LuminRabbit on October 07, 2018, 01:06:13 PM
Hello,

Im new to Playmaker and just doing the basics to get familiar and wanted to post here while I search the internet and view many, many videos.

Currently in my scene when I click a UI button I have a 2d object rotating 360 degrees then when I release the UI button the rotation stops ;) (perfect!).

How would I add a speed variable to control the speed?
(http://)

Also do I need to add or worry about time.deltatime (for the rotation)?
Title: Re: Variable Rotation Speed
Post by: djaydino on October 07, 2018, 02:17:10 PM
Hi,
When you set 'per second' it is doing time.deltatime :)

on the side where you set 360 there is a = sign.
press on that and then click on 'none' and create a new variable.
or you can make it in the variable tab (if you made it in the 1st way then you can edit the variable here also)

Now you can make a 2nd fsm and in that fsm you can do for example this :

state1 :
Place a 'wait' and a Set Fsm Float. set the value to 1 on the wait action.
Then for the Set Fsm Float redirect that to the value on the 1st fsm and set a value
then connect to state2

state2
Place the same as in state 1 but set a different value on the Set Fsm Float.
Then connect to state1

Now it should change speed every second.

There are of course many other things you could do :)

Check out some of the beginner tutorials on the User Tutorial Wiki Page (http://)

Also its good to read this (https://hutonggames.fogbugz.com/default.asp?W1462)
Title: Re: Variable Rotation Speed
Post by: LuminRabbit on October 07, 2018, 04:16:11 PM
I appreciate the response and the detailed explanation :D

:P yep, Im an idiot the number value put into the z angle field is the speed value :) I also did as suggested clicking the none to add the speed variable which was created using the variables section.

Also thank you for the link I've been watching video tutorials all day while practicing and getting to learn playmaker.. so far I think this is absolutely amazing :D

I seriously appreciate you taking the time to assist me! Thank You!!!!
Title: Re: Variable Rotation Speed
Post by: djaydino on October 08, 2018, 12:55:51 AM
Hi.
No Problem.
If you get stuck feel free to ask on the forum.

There is also a Discord Channel : https://discord.gg/0x3rD9QkXZDzvmuW