playMaker

Author Topic: Smooth Float [SOLVED]  (Read 1682 times)

agito1987

  • Playmaker Newbie
  • *
  • Posts: 37
Smooth Float [SOLVED]
« on: September 08, 2017, 01:31:23 PM »
Hey

I am Building Something like a Schmup.

I roll the player by the angel of the left controller stick. So the rotation can be small when moving slow, and big if the stick is fully pulled to the side.
When the stick is released the player snaps back to 0.

I want to smooth the movement so the ship won’t go into full or zero rotation instantly.

I already saw some posts mention interpolate float or tweens (however those work only once, and I need a by frame solution.).
Or do I have to split this up into multiple states?

I have my rotation set up as seen in this tutorial:

My palyer ship is relatively large, so the rotating effect is very important to me to get right.

Right now my rotation is setup in one state consisting of: Get axis vector -> Get Vector 3 xyz -> Float multiply -> set rotation -> float Clamp.


Thanks.
Chris
« Last Edit: September 10, 2017, 10:46:49 AM by agito1987 »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Smooth Float
« Reply #1 on: September 08, 2017, 10:33:51 PM »
Hi,
On the Ecosystem there are some new "damp" actions maybe the can be useful to you.

Just search for 'damp'

agito1987

  • Playmaker Newbie
  • *
  • Posts: 37
Re: Smooth Float
« Reply #2 on: September 10, 2017, 10:45:54 AM »
Ok I solved my problem.

The damp functions didn’t work out for me. They only execute once in a state. And I just couldn’t figure it out.

My solution to the problem is the smooth look at function.

Instead of the player itself I rotate an empty game object in a small arc around my player (same setup as before.) and given the player ship itself the look at function for the roll movement.

But still thank you for the reply =]