Body types

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Body types

Postby Slick » Mon Nov 01, 2021 11:50 am

I'm slowly working on porting to 4.x.

What is the difference between ndBodyDynamic and ndBodyKinematic. I see various types in ndBody.h.

I am used to kinematic for notifications but not collisions that stop other objects and then scene type bodies that don't move and then regular bodies that do move.

Presently I am working on adapting my mesh parsing code to 4.0 but I need to understand this too.
Slick
 
Posts: 330
Joined: Sat Feb 07, 2004 7:24 pm
Location: LA last and France now

Re: Body types

Postby Julio Jerez » Mon Nov 01, 2021 1:17 pm

it is the same as it was in 3.xx.

the kinematic body is the base class,
dynamics body is one that is move by forces.

they are all treaded the same by the solve and the collision system, except that kinematic body are not integrated. it is the job of the application to integrate them.

it sounds like a distinction without a difference, but that subtle calcification make a huge difference in behavior.
take for example a player controller capsule, which BTW is now a engine class.

there are many difference to make this. and for decades engine has going to many way of implementing them and claiming victory falsely.

one idea is to make it a dynamics body control by a capsule, and that work, but the quality of the player motion is quite mediocre with lot of lags and overshooting.
another method is to make a static body, but that alone lead to terrible explosion, since the solvers see a moving static body and one with infinite momentum, and since rigid body is about the transfer of momentum, when a static body has a non zero velocity it transfer a huge almond of momentum to any dynamics body, leading to explosion. (has you seen game like GTA where a pedestrian can make a 20 ton dump truck flying out of the map)
some engines, including popular ones implement a player as a extra pass that only use the collision system but not the solver.

In newton the player is a kinematic body meaning is has mass. and can go to the physics solve without problems. but the motion is controlled by a function that map the player input to velocities.
that's just one case, other case in moving platforms, triggers, and so on.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 55 guests