Anim8or Community
May 24, 2013, 08:28:48 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: The v0.97d Preview is now available!  See the "Anim8or v0.97 Preview" Forum for details.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: PI is wrong?  (Read 1305 times)
Pirmin
Newbie
*
Posts: 11



View Profile
« on: October 11, 2008, 02:59:49 am »

I have a Scene with 720 Frames where I want a vehicle to do a circle movement.
The Location controller looks like this.
Code:
float $radius;
float $radian;

$radius = 450.0;
$radian = 2*PI * frame/720.0;  /* not reduced for clarity */

$position.y = 7.0;
$position.x = $radius * cos($radian);
$position.z = $radius * sin($radian);
When I run this scene the vehicle does the circle movement but stops about 10 degrees before closing the circle! Cry

When I define an own variable $pi the vehicle moves the full circle.  Wink
Here is my modification.
Code:
float $radius;
float $radian;
float $pi;

$pi = 3.1415926;
$radius = 450.0;
$radian = 2*$pi * frame/720.0;  /* not reduced for clarity */

$position.y = 7.0;
$position.x = $radius * cos($radian);
$position.z = $radius * sin($radian);
Logged
Kubajzz
Flying Platypus
Global Moderator
Sr. Member
*****
Posts: 548


Little doggie ate my avatar...


View Profile
« Reply #1 on: October 11, 2008, 03:28:50 am »

What version of Anim8or are you using? The PI value should should be correct in v0.97d.
Logged
Pirmin
Newbie
*
Posts: 11



View Profile
« Reply #2 on: October 11, 2008, 04:06:17 am »

Sorry, I had an old version (0.95c).
With the newest version it's OK.
Thank you!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!