summaryrefslogtreecommitdiff
path: root/src/tesseract/objects/PhysicalObject.java
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-02-12 18:57:14 +0000
committerJesse Morgan <jesse@jesterpm.net>2011-02-12 18:57:14 +0000
commitc663dffc86a7fcec9f05aaf8a107e6200a35c2fa (patch)
tree4642d001dddf0042854c77cafd245b37cb9062ee /src/tesseract/objects/PhysicalObject.java
parent354a7aa455a016ac179d7f027014e6b9c2a2433a (diff)
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.
Diffstat (limited to 'src/tesseract/objects/PhysicalObject.java')
-rw-r--r--src/tesseract/objects/PhysicalObject.java5
1 files changed, 4 insertions, 1 deletions
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<PhysicalObject> 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);
}
}