playMaker

Author Topic: Making an object gradually rotate faster then move into another state  (Read 3927 times)

PET

  • Full Member
  • ***
  • Posts: 139
    • GamerPET
Hello guys,

I have a car with 4 wheels. I made the wheels rotate on the X axis without any problems but now I want to add acceleration so it woun't be ... "BAM rotate at 10".

So I have 4 states.

Listener
Wheels Accelerating
Wheels Rotating
Wheels Slowing Down


Basically I want the wheels to gradually start to rotate from 1 to 10. When I reach 10 I move on the "Wheels Rotating" state which will basically just rotate the wheels at 10. Then I have another state that will de-accelerate gradually the wheels from 10 to 1.

I'm trying to give a nice impression that the car is accelerating and slowing down.

What's the best way to do this?

Thank You
Technical Game Designer
www.GamerPET.com

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Making an object gradually rotate faster then move into another state
« Reply #1 on: August 30, 2015, 04:22:43 PM »
Use the animate float function setup the graph to go from 0 to 10. Rotate on the x axis with the new float variable.

Grendal

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Making an object gradually rotate faster then move into another state
« Reply #2 on: August 31, 2015, 02:48:03 AM »
if your interested in playmaker assets, I saw and tried a really nice vehicles kit made with playmaker that came out in June (https://www.assetstore.unity3d.com/en/#!/content/26508) "Car setup for Playmaker".. It is the best "feeling" vehicle kit out of the box that I have seen.. and I have most. I am currently using 1-Click but I may get this one too since its $19.99 and has opening doors, trunks, hoods, windows that roll up and down.. etc.

At minimum its cheaper than a month of online tutorials subscriptions and you get good fsms to learn from.

Not affiliated... just fit the topic.

PET

  • Full Member
  • ***
  • Posts: 139
    • GamerPET
Re: Making an object gradually rotate faster then move into another state
« Reply #3 on: August 31, 2015, 04:51:31 AM »
Use the animate float function setup the graph to go from 0 to 10. Rotate on the x axis with the new float variable.

Thanks. I did something like this:

http://puu.sh/jUPPo/b14780885f.png

Now I'm trying to do the reverse thing. "WheelSlowingDown". I'm trying to make the wheel gradually stop, however ... no idea why but it does not stop. I made the curve go the other way around.

Any idea how to make an object gradually slow it's rotation down?
Technical Game Designer
www.GamerPET.com

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Making an object gradually rotate faster then move into another state
« Reply #4 on: August 31, 2015, 01:07:24 PM »
How are you slowing it down? Animate the float from 10 back to 0 then set it to 0 so it is for certain not rotating.

PET

  • Full Member
  • ***
  • Posts: 139
    • GamerPET
Re: Making an object gradually rotate faster then move into another state
« Reply #5 on: September 01, 2015, 05:04:35 AM »
How are you slowing it down? Animate the float from 10 back to 0 then set it to 0 so it is for certain not rotating.

I did a reversed curve... but somehow it didn't slowed down.
Technical Game Designer
www.GamerPET.com

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Making an object gradually rotate faster then move into another state
« Reply #6 on: September 03, 2015, 02:24:09 AM »
Hmm I tested this real quick and it works solid on my end.

The test FSM went like this:
start-> Animate float 0 to 10, on finish go to next, rotate on x=float -> set float to 10, on keypress go to next, rotate on x=float -> Animate float 10 to 0, on keypress go to start, rotate on x=float ->

Are your animated floats set to looping, clamped, or pingpong? They should be clamped. Are there any other FSMs or actions trying to rotate your wheel that could be interfering? If you still can't get it to work, perhaps post a screenshot of your FSM and the actions your using and myself or someone else might be able to give you better advice. Good luck.

PET

  • Full Member
  • ***
  • Posts: 139
    • GamerPET
Re: Making an object gradually rotate faster then move into another state
« Reply #7 on: September 03, 2015, 04:00:37 AM »
Well this was kind of a fast project and I had to work on it fast so I didn't had time to experiment with it to much :)

This is what I currently have right now:

http://puu.sh/jYj09/bcba709697.png

I was going on the idea that ... the first thing is basically adding up to the float and that the rotate thing is listening to that float variable.
Technical Game Designer
www.GamerPET.com

Justin

  • Junior Playmaker
  • **
  • Posts: 58
Re: Making an object gradually rotate faster then move into another state
« Reply #8 on: September 03, 2015, 03:06:05 PM »
Did you still need help with this then? Also sorry, I meant a cap of the slowing down state with the reverse float in it.  The one your having problems with.