Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Dynamics / How to calculate angle of trajectory?
  RSS 2.0 ATOM  

How to calculate angle of trajectory?
Rate this thread
 
45003
 
Permlink of this thread  
avatar
  • Total Posts: 10
  • Joined: 10 October 2006 03:40 PM

Hi,
I’m trying to rotate sprites based on it’s angle of trajectory. I found a formula somewhere on the web that explains the same with the following:
a=atan2(vy, vx)

So in Maya, I used:

vector $vel = particleShape1.velocity;
$velX = $vel.x;
$velY = $vel.y;

particleShape1.spriteTwistPP = atan2($velY, $velX);

didn’t get any error,but there is no change in sprite’s rotation. Is it all wrong?

If this is not the way to calculate the rotation, then can someone please suggest a way to achieve the same?

Need help!!

Thanks



Replies: 0