- fix missing material in debug state
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10354 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
9b487ede59
commit
d729bbc43a
@ -31,10 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.jme3.bullet.debug;
|
package com.jme3.bullet.debug;
|
||||||
|
|
||||||
import com.jme3.bullet.collision.shapes.CapsuleCollisionShape;
|
|
||||||
import com.jme3.bullet.collision.shapes.CollisionShape;
|
import com.jme3.bullet.collision.shapes.CollisionShape;
|
||||||
import com.jme3.bullet.collision.shapes.CylinderCollisionShape;
|
|
||||||
import com.jme3.bullet.collision.shapes.SphereCollisionShape;
|
|
||||||
import com.jme3.bullet.objects.PhysicsCharacter;
|
import com.jme3.bullet.objects.PhysicsCharacter;
|
||||||
import com.jme3.bullet.util.DebugShapeFactory;
|
import com.jme3.bullet.util.DebugShapeFactory;
|
||||||
import com.jme3.math.Quaternion;
|
import com.jme3.math.Quaternion;
|
||||||
@ -82,6 +79,7 @@ public class BulletCharacterDebugControl extends AbstractPhysicsDebugControl {
|
|||||||
Node node = (Node) this.spatial;
|
Node node = (Node) this.spatial;
|
||||||
node.detachChild(geom);
|
node.detachChild(geom);
|
||||||
geom = DebugShapeFactory.getDebugShape(body.getCollisionShape());
|
geom = DebugShapeFactory.getDebugShape(body.getCollisionShape());
|
||||||
|
geom.setMaterial(debugAppState.DEBUG_PINK);
|
||||||
node.attachChild(geom);
|
node.attachChild(geom);
|
||||||
}
|
}
|
||||||
applyPhysicsTransform(body.getPhysicsLocation(location), Quaternion.IDENTITY);
|
applyPhysicsTransform(body.getPhysicsLocation(location), Quaternion.IDENTITY);
|
||||||
|
@ -31,10 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.jme3.bullet.debug;
|
package com.jme3.bullet.debug;
|
||||||
|
|
||||||
import com.jme3.bullet.collision.shapes.CapsuleCollisionShape;
|
|
||||||
import com.jme3.bullet.collision.shapes.CollisionShape;
|
import com.jme3.bullet.collision.shapes.CollisionShape;
|
||||||
import com.jme3.bullet.collision.shapes.CylinderCollisionShape;
|
|
||||||
import com.jme3.bullet.collision.shapes.SphereCollisionShape;
|
|
||||||
import com.jme3.bullet.objects.PhysicsGhostObject;
|
import com.jme3.bullet.objects.PhysicsGhostObject;
|
||||||
import com.jme3.bullet.util.DebugShapeFactory;
|
import com.jme3.bullet.util.DebugShapeFactory;
|
||||||
import com.jme3.math.Quaternion;
|
import com.jme3.math.Quaternion;
|
||||||
@ -49,6 +46,7 @@ import com.jme3.scene.Spatial;
|
|||||||
* @author normenhansen
|
* @author normenhansen
|
||||||
*/
|
*/
|
||||||
public class BulletGhostObjectDebugControl extends AbstractPhysicsDebugControl {
|
public class BulletGhostObjectDebugControl extends AbstractPhysicsDebugControl {
|
||||||
|
|
||||||
protected final PhysicsGhostObject body;
|
protected final PhysicsGhostObject body;
|
||||||
protected final Vector3f location = new Vector3f();
|
protected final Vector3f location = new Vector3f();
|
||||||
protected final Quaternion rotation = new Quaternion();
|
protected final Quaternion rotation = new Quaternion();
|
||||||
@ -83,6 +81,7 @@ public class BulletGhostObjectDebugControl extends AbstractPhysicsDebugControl{
|
|||||||
Node node = (Node) this.spatial;
|
Node node = (Node) this.spatial;
|
||||||
node.detachChild(geom);
|
node.detachChild(geom);
|
||||||
geom = DebugShapeFactory.getDebugShape(body.getCollisionShape());
|
geom = DebugShapeFactory.getDebugShape(body.getCollisionShape());
|
||||||
|
geom.setMaterial(debugAppState.DEBUG_YELLOW);
|
||||||
node.attachChild(geom);
|
node.attachChild(geom);
|
||||||
}
|
}
|
||||||
applyPhysicsTransform(body.getPhysicsLocation(location), Quaternion.IDENTITY);
|
applyPhysicsTransform(body.getPhysicsLocation(location), Quaternion.IDENTITY);
|
||||||
|
@ -31,10 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.jme3.bullet.debug;
|
package com.jme3.bullet.debug;
|
||||||
|
|
||||||
import com.jme3.bullet.collision.shapes.CapsuleCollisionShape;
|
|
||||||
import com.jme3.bullet.collision.shapes.CollisionShape;
|
import com.jme3.bullet.collision.shapes.CollisionShape;
|
||||||
import com.jme3.bullet.collision.shapes.CylinderCollisionShape;
|
|
||||||
import com.jme3.bullet.collision.shapes.SphereCollisionShape;
|
|
||||||
import com.jme3.bullet.objects.PhysicsRigidBody;
|
import com.jme3.bullet.objects.PhysicsRigidBody;
|
||||||
import com.jme3.bullet.util.DebugShapeFactory;
|
import com.jme3.bullet.util.DebugShapeFactory;
|
||||||
import com.jme3.math.Quaternion;
|
import com.jme3.math.Quaternion;
|
||||||
@ -83,6 +80,7 @@ public class BulletRigidBodyDebugControl extends AbstractPhysicsDebugControl {
|
|||||||
Node node = (Node) this.spatial;
|
Node node = (Node) this.spatial;
|
||||||
node.detachChild(geom);
|
node.detachChild(geom);
|
||||||
geom = DebugShapeFactory.getDebugShape(body.getCollisionShape());
|
geom = DebugShapeFactory.getDebugShape(body.getCollisionShape());
|
||||||
|
geom.setMaterial(debugAppState.DEBUG_BLUE);
|
||||||
node.attachChild(geom);
|
node.attachChild(geom);
|
||||||
}
|
}
|
||||||
applyPhysicsTransform(body.getPhysicsLocation(location), body.getPhysicsRotation(rotation));
|
applyPhysicsTransform(body.getPhysicsLocation(location), body.getPhysicsRotation(rotation));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user