The Daily Click ::. Forums ::. Klik Coding Help ::. Maintaining rotation speed
 

Post Reply  Post Oekaki 
 

Posted By Message

CakeSpear



Registered
  28/01/2004
Points
  112
24th December, 2009 at 00:42:33 -

Hi, I'm new to this forum. Maybe not, but haven't dropped by here for several years.

I'll try to explain this as simple as possible.
I have an ObjectA that should rotate round a point(X,Y) in my frame. I use this formula;
set X( "ObjectA" ) to X( "RotationPoint" ) @pluss Abs(Radius_( "ObjectA" ))*Cos(Angle_( "ObjectA" ))

set Y( "ObjectA" ) to Y( "RotationPoint" ) @pluss Abs(Radius_( "ObjectA" ))*Sin(Angle_( "ObjectA" ))

'W','S' increases the Radius_(distance from RotationPoint) of ObjectA
'A','D' adds/ subtracts from Angle_(Angle from RotationPoint to ObjectA) of ObjectA, and here's where my problem lies.

ObjectA rotates slower when closer to RotationPoint, and faster when further away, when just adding and subtracting the same amounth from Angle_. I want ObjectA to maintain the same rotation speed no matter his Radius_.

So i need to regulate the amount to add/ subtract from Angle_ according to his Radius_, but i don't have the mathematical mind to figure out how i would do this. Anyone have experience with this maybe? If anyone gets my problem and are able to help in ANY way, it would be much appreciated if you posted anything that might be of assistance. I think what im looking for is a formula to regulate RotatingSpeed_ according to Radius_.

@ i wrote "pluss" because '+'(pluss) just appears as a blank space
I am using MMF2 by the way

Edited by CakeSpear

 
n/a
   

Post Reply



 



Advertisement

Worth A Click