Difference :: kinematic object of mass zero & non-kinematic object of mass zero

Q1 : What’s the difference between kinematic object of mass zero and non kinematic object of mass zero? Both sounds applicable for static immovable object, like ground or a house.



Q2 : in the doc, its written, A kinematic RigidBody has a mass.

I am moving non-kinematic objects using Node methods, like setLocalTranslation or similar. Then, what’s the point of having a mass for an non-dynamic object?

Its explained in the docs. As inertia is calculated for kinematic objects you need mass to do that.

1 Like

Thanks found it.



Its written, “For large static meshes like shooter levels or terrain its best to divide the mesh into multiple physics objects to allow the less CPU intense broadphase to filter out most collision items.”



What does it mean by “divide the mesh into multiple objects”. Is it like portal system, where I divide the whole levels into multiple parts…like multiple PhysicsSpace objects for a certain part of the level? Then detach them when there are not needed, and attach the new assets on a different part of the level.

no, just multiple rigidbodies ^^

iamcreasy said:
I am moving non-kinematic objects using Node methods, like setLocalTranslation or similar.

Btw, thats very bad (as also stated in the docs). Since these objects have no mass you get faulty physics when they collide with other objects. Basically moving them is like beaming them. They don't collide, they "appear inside" other objects and can cause all kinds of funny effects like stuff "exploding" or getting stuck etc. Always use kinematic objects when you need to move them "live" and only use mass=0 objects for *static* objects, that only are (re)positioned without colliding with other objects in that moment.

ok.



I was digging in the jBullet. Tried to find out what’s the default value of the field set by setKinematics(), stumbled on the following code.





and when I ctrl + left click on the kinematics variable, jMP doesn’t take me to its deceleration. Why this is happening? What’s the default kinematic value?



Another thing is, Why would we use CollisionShapeFactory when we can instantiate xCollisionShapes directly, under package com.jme3.bullet.collision.shapes;( x = box, capsule, compound…)



And all the methods of CollisionShapeFactory are unexplained. How to know which one to use in which situation. A head start would help.

Unless you messed up your libraries all of these classes have javadoc.

a) Obviously its not kinematic by default, else the objects in the simple physics example would not fall, would they?

b) The factory can create collision shapes composited out of multiple single collision shapes for multiple geometries based on the composition of the given Node (e.g. a model you load with many objects).

Hey, sorry to bring up an old thread, but I am having the same problem iamcreasy was. If I’m in the editor, I can’t seem to pull up javadocs or source for classes in com.jme3.bullet.* packages. Other classes have been working fine. Does anyone know what might have gone wrong?

Not really, its part of the same library that has the full jme3 javadoc zip… oO

I figured out the problem - the source and javadocs were not properly configured for the jme3-libraries in the IDE. A simple mistake on my part and easy to fix. :slight_smile:

@suddenastronaut in jMP already should be automatically configured! isn’t it?

What else did you do?

Hey @iamcreasy, I did the following:



In the Projects panel, right click on Libraries and choose Properties. In the Compile tab, choose jme3-libraries and click Edit.



In the Sources tab, click Add Jar/Folder. Navigate to where the jMonkey jars are installed (something like …/.jmonkeyplatform/beta3.0/libs) and choose jMonkeyEngine3-sources.zip. That should let you access the source files from within the IDE.



In the Javadoc tab, repeat those steps, but choose jMonkeyEngine3-javadoc.zip instead. That should let you access the javadocs.



That fixed the problem for everything in jME3-jbullet.jar. I still can’t access source files from other items under jme3-libraries, but I assume that’s because they’re not part of the com.jme3 package?



Hope this helps!

@suddenastronaut said:
Hey @iamcreasy, I did the following:

In the Projects panel, right click on Libraries and choose Properties. In the Compile tab, choose jme3-libraries and click Edit.

In the Sources tab, click Add Jar/Folder. Navigate to where the jMonkey jars are installed (something like .../.jmonkeyplatform/beta3.0/libs) and choose jMonkeyEngine3-sources.zip. That should let you access the source files from within the IDE.


so basically you are adding the source and doc to jME3-library. But they should go with jME3, not jME3-library. And that's been set by default.
@iamcreasy said:
so basically you are adding the source and doc to jME3-library. But they should go with jME3, not jME3-library. And that's been set by default.


I guess so? I don't know why the jbullet libs appear separately from the other com.jme3 libs, as those were set up correctly.

I guess you have to download and attach the jBullet source to get access.