playMaker

Author Topic: Variable Rotation Speed[SOLVED]  (Read 1331 times)

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Variable Rotation Speed[SOLVED]
« 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?


Also do I need to add or worry about time.deltatime (for the rotation)?
« Last Edit: October 08, 2018, 03:26:51 AM by jeanfabre »
Have I said how much I love playmaker!!! This is one amazing tool

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Variable Rotation Speed
« Reply #1 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

Also its good to read this

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: Variable Rotation Speed
« Reply #2 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!!!!
« Last Edit: October 07, 2018, 04:42:17 PM by Kodagames »
Have I said how much I love playmaker!!! This is one amazing tool

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Variable Rotation Speed
« Reply #3 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