playMaker

Author Topic: itween rotates in a wrong direction[SOLVED]  (Read 2515 times)

ymassuot

  • Playmaker Newbie
  • *
  • Posts: 6
itween rotates in a wrong direction[SOLVED]
« on: March 09, 2017, 11:13:45 AM »
Hello dear friends
I wonder how possible to restrict the rotation using "itween rotate to" action?
I want to increase the rotation from 0 to 100 or decrease the rotation from 100 to 0 about Z axis using positive angles only not negative angles? I mean Just
0,1,2,3....100
100, 99, 98,....0
not
0,-1,-2...100
100, 101, 102,...0
« Last Edit: March 13, 2017, 09:07:14 AM by ymassuot »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: itween rotates in a wrong direction
« Reply #1 on: March 10, 2017, 01:44:37 AM »
Hi,

 I tested and everything is working fine here




Bye,

 Jean

ymassuot

  • Playmaker Newbie
  • *
  • Posts: 6
Re: itween rotates in a wrong direction
« Reply #2 on: March 12, 2017, 07:16:35 AM »
Hi

I have a robotic arm, The user can make adjustments to every servo angle. However, when for example the servo has 10 Deg angle, once the user sets it to 110, the servo rotates clockwise, however it should rotate counter clockwise.

ymassuot

  • Playmaker Newbie
  • *
  • Posts: 6
Re: itween rotates in a wrong direction
« Reply #3 on: March 12, 2017, 09:46:04 AM »
I found the bug in itween rotate to!  :(
When the angle exceed 180 for example 250, the i tween use the least path to reach that angle. From 0 to 250 it passes from -1 -2 ... to 250, however when the second angle is for example 100, then it use positive numbers to reach from 0 to 100. I tween must have a clockwise or counter clock wise option to select.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: itween rotates in a wrong direction
« Reply #4 on: March 13, 2017, 01:50:59 AM »
Hi,

 I don't think it's a bug, but by design. If you want total control you should likely use a regular float as the angle, and then you can tween the float itself and apply that as the angle for setting the rotation of your robotic arm.


 Bye,

 Jean

ymassuot

  • Playmaker Newbie
  • *
  • Posts: 6
Re: itween rotates in a wrong direction
« Reply #5 on: March 13, 2017, 09:05:02 AM »
Hi Jean
Your method works for me. 8) I used "Float Interpolate" action to tween between my angles and then use the resulted float to set the rotation of my robotic arm.
Thanks dude ;)