From c663dffc86a7fcec9f05aaf8a107e6200a35c2fa Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Sat, 12 Feb 2011 18:57:14 +0000 Subject: Added HalfSpaces to the bounds. Fixed collisions and particle emitters. Corrected typo in PlanarPolygonMenuItem. Added removeForce() to world and cleaned up the force adding/removing. --- src/tesseract/objects/PhysicalObject.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/tesseract/objects/PhysicalObject.java') diff --git a/src/tesseract/objects/PhysicalObject.java b/src/tesseract/objects/PhysicalObject.java index 2634ca2..73e0c91 100644 --- a/src/tesseract/objects/PhysicalObject.java +++ b/src/tesseract/objects/PhysicalObject.java @@ -22,9 +22,12 @@ import com.sun.j3d.utils.geometry.Primitive; * @author Jesse Morgan */ public class PhysicalObject extends CollidableObject { + protected boolean collidable; + public PhysicalObject(final Vector3f thePosition, final float mass) { super(mass); this.position.set(thePosition); + collidable = true; } public List spawnChildren(final float duration) { @@ -67,7 +70,7 @@ public class PhysicalObject extends CollidableObject { } public void resolveCollisions(final PhysicalObject other) { - if (this.node != null && other.node != null) { + if (collidable && other.collidable) { super.resolveCollisions(other); } } -- cgit v1.2.3