diff --git a/src/main/java/cactusServer/entities/MovableObject.java b/src/main/java/cactusServer/entities/MovableObject.java index 6d45442..34856e7 100644 --- a/src/main/java/cactusServer/entities/MovableObject.java +++ b/src/main/java/cactusServer/entities/MovableObject.java @@ -6,10 +6,7 @@ import org.ntlab.radishforandroidstudio.framework.model3D.Position3D; import org.ntlab.radishforandroidstudio.framework.model3D.Quaternion3D; import org.ntlab.radishforandroidstudio.framework.physics.AngularVelocity3D; -import org.ntlab.radishforandroidstudio.framework.physics.Solid3D; import org.ntlab.radishforandroidstudio.framework.physics.Velocity3D; -import org.ntlab.radishforandroidstudio.java3d.Box; -import org.ntlab.radishforandroidstudio.java3d.Primitive; import cactusServer.models.ObjectModelManager; //import framework.model3D.Position3D; @@ -24,7 +21,6 @@ private Quaternion3D angle; private Attribute attribute; private Model3D model; - private Primitive prim; private Object3D object; @JSONHint(ignore = true) @@ -37,15 +33,14 @@ public MovableObject(Position3D position, Velocity3D velocity, AngularVelocity3D angularVelocity, Quaternion3D angle, Attribute attribute, int modelID) { - setPrim(new Box()); - setObject(new Solid3D(new Object3D("", prim))); - setPlaceable(new OvergroundActor((Solid3D) object, null)); + setModel(modelID); + setObject(model.createObject()); + setPlaceable(new OvergroundActor(object, null)); setPosition(position); setVelocity(velocity); setAngularVelocity(angularVelocity); setAngle(angle); setAttribute(attribute); - setModel(modelID); } public Position3D getPosition() { @@ -132,15 +127,6 @@ } @JSONHint(ignore = true) - public Primitive getPrim() { - return prim; - } - - public void setPrim(Primitive prim) { - this.prim = prim; - } - - @JSONHint(ignore = true) public Object3D getObject() { return (Object3D) getPlaceable().getBody(); }