Note that there are some explanatory texts on larger screens.

plurals
  1. PONegativeArraySizeException on CollisionShape
    primarykey
    data
    text
    <p>I am trying to put a collision-shape onto my model. But everytime I init the game, I get an NegativeArraySizeException.</p> <pre><code>private void createSoundBit(float x, float y, float z) { Spatial npc1 = assetManager.loadModel("Models/sound/sound.j3o"); npcNode.attachChild(npc1); CollisionShape noteshape = CollisionShapeFactory.createDynamicMeshShape(npc1); npcRigid = new RigidBodyControl(noteshape,123.0f); npcRigid.setFriction(0f); npcRigid.setMass(60f); npcRigid.setPhysicsLocation(new Vector3f(x,y,z)); collmanager = new CollManager(); getPhysicsSpace().addCollisionListener(collmanager); npc1.addControl(npcRigid); bulletAppState.getPhysicsSpace().add(npcRigid); rootNode.attachChild(npcNode); } </code></pre> <p>I don't know why it happens</p> <p>Stacktrace:</p> <pre><code>java.lang.NegativeArraySizeException at com.jme3.bullet.collision.shapes.HullCollisionShape.getPoints(HullCollisionShape.java:71) at com.jme3.bullet.collision.shapes.HullCollisionShape.&lt;init&gt;(HullCollisionShape.java:24) at com.jme3.bullet.util.CollisionShapeFactory.createSingleDynamicMeshShape(CollisionShapeFactory.java:241) at com.jme3.bullet.util.CollisionShapeFactory.createCompoundShape(CollisionShapeFactory.java:112) at com.jme3.bullet.util.CollisionShapeFactory.createCompoundShape(CollisionShapeFactory.java:94) at com.jme3.bullet.util.CollisionShapeFactory.createDynamicMeshShape(CollisionShapeFactory.java:188) at Main.createSoundBit(Main.java:206) at Main.simpleInitApp(Main.java:83) at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225) at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130) at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207) at java.lang.Thread.run(Thread.java:722) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload