playMaker

Author Topic: Single axes rotation[SOLVED]  (Read 2198 times)

buggie

  • Playmaker Newbie
  • *
  • Posts: 7
Single axes rotation[SOLVED]
« on: February 09, 2019, 02:45:55 AM »
Hi, I have been running into the need of a single axes rotation. The issue is; I am making a player controller that controls rotation and speed. The game is setup to have rotation X, Y, Z all on different FSM's for smooth control. It works great but when the player stops moving, I want the player to slowly rotate back to *,*,0. The problem seems that if I use the current rotation actions, I have to put in a value for all axes, not just Z. This make the player move all funky, fighting the player on the other 2 axes. It would be very cool to have an action that lets you rotate any of the 3 axes independently. I checked the Eco system, and couldn't find anything that matches what I need. iTween also lacks this but has an over time option and a delay. Any chance we could get something like this?
« Last Edit: February 11, 2019, 04:43:12 AM by djaydino »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Single axes rotation
« Reply #1 on: February 10, 2019, 11:31:59 AM »
Hi.
You can achieve this by getting the current z rotation (float)

then use (for example) Float interpolate to move the float slowly to 0 in a Variable (the Z rotation)

Then use 'Set rotation', set it to every frame and set the "Z rotation" value to do the rotation.

You can also tween the float but itween is outdated.

buggie

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Single axes rotation
« Reply #2 on: February 10, 2019, 11:52:54 AM »
 :o Thank you, I suspected something like that.
I was just wondering if we could get an Action that could not use all three rotations, say only use 1 or 2 of them, and not require any information for the unused rotation. Not even a zero, just null it. It would make the computer have to do less calculations and would be easier to use.
It's more of an optimization request, and user friendly thing. I understand if you don't think it is worth the time. I'm just saying, I'm just makin a request.  :'(

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Single axes rotation
« Reply #3 on: February 10, 2019, 12:05:26 PM »
Hi.
What exact existing action are you referring to?

buggie

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Single axes rotation
« Reply #4 on: February 11, 2019, 03:02:20 AM »
I took your advice and used a float that changes back to 0, and set that as my rotation, and that solved it. Thank you. Turns out I was just too tired to think strait, despite not feeling tired. This case seems to be a problem between the keyboard and the chair. Thanks for pointing it out.  ;D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Single axes rotation
« Reply #5 on: February 11, 2019, 04:42:54 AM »
Hi.
No Problem :)