-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
PhysicsIssues with all kinds of Physics and their BindingsIssues with all kinds of Physics and their BindingsbugSomething that is supposed to work, but doesn't. More severe than a "defect".Something that is supposed to work, but doesn't. More severe than a "defect".
Milestone
Description
When Native Bullet is used with setDebugEnabled, scaled shapes are rendered as if they were unscaled. This can be demonstrated by modifying TestPhysicsRayCast to add the model (and a light source) to the scene:
Spatial s = assetManager.loadModel("Models/Elephant/Elephant.mesh.xml");
s.setLocalScale(0.1f);
rootNode.attachChild(s);
AmbientLight l = new AmbientLight();
rootNode.addLight(l);
With this mod, it's clear that the debug visualization of the rigid body doesn't match the model. But if the model's local scale is set to 1, or if JBullet is used, the visualization matches the model.
The bug seems to be in DebugShapeFactory.getDebugMesh(), which populates a mesh based on an unscaled shape, expecting that the scale will be applied later. However, that scale never gets applied.
Metadata
Metadata
Assignees
Labels
PhysicsIssues with all kinds of Physics and their BindingsIssues with all kinds of Physics and their BindingsbugSomething that is supposed to work, but doesn't. More severe than a "defect".Something that is supposed to work, but doesn't. More severe than a "defect".