The Daily Click ::. Forums ::. Klik Coding Help ::. I u know the answer u are the hero of my day.
 

Post Reply  Post Oekaki 
 

Posted By Message

savvy001



Registered
  27/03/2007
Points
  295
30th October, 2011 at 19:43:21 -

Is there a way to increase the movement ''steps'' of a sin?

In my current movement the sin object moves at stages via seconds.
So every second a sphere moves 1 part out of 360 in orbit around an active.
Its not a smooth transition as it skips per second.
What i need is to maintain the speed of 1 second but the movement of milliseconds.
My thought is that if there is a way to devide the current ''360 parts'' of the sin in to more parts ''in between''.
Then i could set my orbitting object to move via milliseconds but maintaining the speed of seconds.

When i set it to milliseconds now, the speed just amplifies because the orbit only know 360 steps.

 
Living in space

savvy001



Registered
  27/03/2007
Points
  295
30th October, 2011 at 20:27:43 -

I just found the easing object.
Anyone know how to set its parameters so i can have this extension control the speed of my sin object?
I allready found out that it does allow slow millisecond moving


 
Living in space

savvy001



Registered
  27/03/2007
Points
  295
30th October, 2011 at 22:03:57 -

I got the answer from the creator of the easing object through mail.
I did not use floating point values wich i should have, but better is to read it for yourself.

Quote: Anders riggelsen.
It sounds like you are having some rounding issues with your math. Make sure MMF always operates with floating point values.
For example always set the position of "pluto" to:
x: cos( timer/10.0 )*radius + centerX
y: sin( timer/10.0 )*radius + centerY

If you divide the timer value with an integer (without the '.0' part) it ends up rounding to the nearest integer of the timer value making it appear that it snaps to individual 360 degrees.
For MMF to use floating point math by adding the '.0' part to your number and it should be smooth.


 
Living in space

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
3rd November, 2011 at 09:44:24 -

So I guess it is you who is hero of the day!

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
3rd November, 2011 at 09:44:55 -

Or whatever day it was...

 
n/a
   

Post Reply



 



Advertisement

Worth A Click