Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Am I Using SetAutoFreeze() Incorrectly?  (Read 262 times)
sybixsus
Customers
Community Member
*****
Posts: 1088


WWW
« on: September 15, 2008, 02:25:31 PM »

My physics objects aren't coming to a complete standstill as quickly as I would like, so I've been changing the settings in SetAutoFreeze to help things along, but it isn't helping. So to check what values I needed to set, I started writing the values of objects which are not frozen out to the debug log.

My SetAutoFreeze settings are  ( True, 0.1, 0.5, 20 )

The debuglog includes lines like this :

DebugLog:Linear Velocity:-0.00152517809,-0.00133150164,0.000935748336
DebugLog:Angular Velocity:0.0230566058,0.00222424604,0.00783647224

Clearly this object is well under the threshold I've set, but it is not being frozen. I guess I could do this myself, but that's a speed hit I could do without when I have a lot of objects. Am I doing something wrong?
Logged
sybixsus
Customers
Community Member
*****
Posts: 1088


WWW
« Reply #1 on: September 17, 2008, 02:50:32 PM »

Anyone?
Logged
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #2 on: September 22, 2008, 04:28:29 PM »

The values must stay below the threshold during several frames : you specified 20 frames in your case.

Also maybe because of floating point inaccuracies (Newton actually doesn't use these thresholds but the square of them in its computation), the velocities maybe never stay below the numbers.

Try to increase the numbers a little again, try to force the floating point accuracy with TV.SetFPUPrecision true before engine init too.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks