Hello, I've got a active rotating with the Angle Extension but I was wondering how I would go about making it seem smoother as at the moment the movement is very juddery.
Printable View
Hello, I've got a active rotating with the Angle Extension but I was wondering how I would go about making it seem smoother as at the moment the movement is very juddery.
Here is an example of the smooth rotation I am talking about http://www.youtube.com/watch?v=dwiLVyDpfjQ notice that the space ship doesn't rotate instantly. It's a smooth delay.
Try something like this:
Spaceship flag 1 is off: set value B to angle of device
Device angle is greater than spaceship's angle: Set spaceship flag 1 on & add 0.25 to spaceship value A
Spaceship flag 1 is on: set spaceship angle to spaceship value B + spaceship value A
Device angle is lower or equal to spaceship value A + spaceship value B: set spaceship flag 1 off & set spaceship value A to 0
Then set up similar conditions for if the device angle is lower than the spaceship's angle.
Or you could use direction calculator etc. to 'rotate towards' the direction.
Unless you mean you want it full speed but to smooth out so it doesn't seem so shaky in which case you can do Abs((Angle/15)*15) (replace 15 with whatever number, the lower the number the more accurate it is).
Pineapple: I've tried that and my Active didn't move :-(
DistantJ: It just seems to move the angle in increments of 15,it's not smooth at all.
Set Angle to (9*Angle+DestinationAngle)/10.0
That won't account for the fact that angles go from 0 to 359, but 0 and 359 are only 1 degree apart, not 359. Jacob had the equation for wrapping angles...
Jacob, it comes up with a syntax error.
Got it working, but like Eliyahu said, it jumps from 0 to 359 by spinning round.
Here is an example of what you need using this formula to figure out the distance between two angles taking wrappage into consideration: ((end-start+540) mod 360)-180