jMonkeyEngine / jMonkeyEngine/jmonkeyengine

HeightfieldCollisionShape is invisible in jme3-jbullet with setDebugEnabled()

Open
#1,129 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Physics
Dominant language
Java
Stars
4.3k
Forks
1.2k
Avg merge
4d 7h
Merged PRs (30d)
14

Description

Physics debug visualization works for HeightfieldCollisionShape in jme3-bullet but not in jme3-jbullet.

To demonstrate this issue, modify jme3test.terrain.TerrainGridAlphaMapTest as follows:

@@ -47,7 +47,7 @@
     private float grassScale = 64;
     private float dirtScale = 16;
     private float rockScale = 128;
-    private boolean usePhysics = false;
+    private boolean usePhysics = true;
 
     public static void main(final String[] args) {
         TerrainGridAlphaMapTest app = new TerrainGridAlphaMapTest();
@@ -161,6 +161,7 @@
         this.terrain.addControl(control);
 
         final BulletAppState bulletAppState = new BulletAppState();
+        bulletAppState.setDebugEnabled(true);
         stateManager.attach(bulletAppState);

With jme3-bullet, the HeightfieldCollisionShape is visualized as blue wireframe, overlaid on the grass/dirt/rock. With jme3-jbullet, only the grass/dirt/rock is visible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with jme3test.terrain.TerrainGridAlphaMapTest, enabling physics and setDebugEnabled(true) as shown. Compare the HeightfieldCollisionShape debug visualization in jme3-bullet and jme3-jbullet, then trace the respective debug-rendering entry points. Done means jme3-jbullet displays the heightfield as a blue wireframe over the terrain.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.