Crazy spastic cylinders

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Crazy spastic cylinders

Postby Henry00 » Mon Aug 08, 2011 10:30 am

Hi everyone once again, I came alot further and implented debug display just now, but the cylinders are going crazy, they lie on the floor then suddenly start to rotate again fly 20 meters in the air, come down bounce roll, go crazy again, roll again and finally maybe it is on the ground.. Any ideas, it's probably a mass or gravity issue?

Image
00Laboratories
Solutions for Developers
http://00laboratories.com/
Henry00
 
Posts: 37
Joined: Mon Aug 01, 2011 7:29 pm
Location: Germany

Re: Crazy spastic cylinders

Postby Julio Jerez » Mon Aug 08, 2011 1:44 pm

had you set the correct mass and inertia?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Crazy spastic cylinders

Postby Henry00 » Mon Aug 08, 2011 1:45 pm

Ok I messed around with some settings:

NewtonSetSolverModel( *NewtonWorld, 1)
NewtonSetPlatformArchitecture( *NewtonWorld, 0)
NewtonSetFrictionModel (*NewtonWorld, 1)

defaultID.i = NewtonMaterialGetDefaultGroupID(*NewtonWorld)
NewtonMaterialSetDefaultSoftness (*NewtonWorld, defaultID, defaultID, 0.005)
NewtonMaterialSetDefaultElasticity (*NewtonWorld, defaultID, defaultID, 0.4)
NewtonMaterialSetDefaultCollidable (*NewtonWorld, defaultID, defaultID, 1)
NewtonMaterialSetDefaultFriction (*NewtonWorld, defaultID, defaultID, 0.9, 0.5)

It made it less, also my guess is there is too much gravity, but if I make it less newton is running so sloooooowwww it's mad making, newton update whatever value I pass it doesn't speed up, any tricks? The engine is way faster then newton so it's not lag :?

Also I just now read, I have no idea, I passed 1 1 1 1, 5 1 1 1 but how should I calculate for example a cylinder?
00Laboratories
Solutions for Developers
http://00laboratories.com/
Henry00
 
Posts: 37
Joined: Mon Aug 01, 2011 7:29 pm
Location: Germany

Re: Crazy spastic cylinders

Postby Julio Jerez » Mon Aug 08, 2011 1:49 pm

there is a function to calculate teh Iniertia of a convex shape.
also a gravity of 9.8 should be fine. are you shape very big is size, if they are you will see objects moving very slow.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Crazy spastic cylinders

Postby Henry00 » Mon Aug 08, 2011 1:52 pm

Julio Jerez wrote:there is a function to calculate teh Iniertia of a convex shape.
also a gravity of 9.8 should be fine. are you shape very big is size, if they are you will see objects moving very slow.


Thanks for teh tip, I should indeed take a look at teh shape very big size. :)

Edit:
Could you share teh function name to calculate teh Iniertia of a convex shape?
00Laboratories
Solutions for Developers
http://00laboratories.com/
Henry00
 
Posts: 37
Joined: Mon Aug 01, 2011 7:29 pm
Location: Germany

Re: Crazy spastic cylinders

Postby Henry00 » Mon Aug 08, 2011 2:05 pm

Julio Jerez THANK YOU SO MUCH!!

You fixed the problem! The world was too big! Thanks alot!
00Laboratories
Solutions for Developers
http://00laboratories.com/
Henry00
 
Posts: 37
Joined: Mon Aug 01, 2011 7:29 pm
Location: Germany


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron