|
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
|
|
|