@@ -0,0 +1,1752 @@
+package net.steel3d.physics;%0A%0Aimport org.lwjgl.util.vector.Vector3f;%0A%0Aimport net.steel3d.util.Object3;%0Aimport net.steel3d.util.Transform;%0A%0Apublic class Rigidbody extends Object3 %7B%0A%0A%09public float mass = 1;%0A%09public float drag = 0.1F;%0A%09public float gravity = 0.1F;%0A%09public Transform now;%0A%09public Transform old;%0A%09public Vector3f acceleration;%0A%09public Vector3f velocity;%0A%09public boolean colliding = false;%0A%09%0A%09public AABB collider;%0A%09%0A%09public boolean%5B%5D freezePosition;%0A%09public boolean%5B%5D freezeRotation;%0A%0A%09%0A%09public Rigidbody(Transform transform)%7B%0A%09%09super(transform);%0A%09%09now = transform;%0A%09%09old = transform;%0A%09%09acceleration = new Vector3f(0,0,0);%0A%09%09velocity = new Vector3f(0,0,0);%0A%09%09collider = new AABB(transform.position,transform.scale);%0A%09%09collider.center(transform.position);%0A%09%09freezePosition = new boolean%5B2%5D;%0A%09%09for(int i = 0; i %3C freezePosition.length;i++)%7B%0A%09%09%09freezePosition%5Bi%5D = false;%0A%09%09%7D%0A%09%09%0A%09%09freezeRotation = new boolean%5B2%5D;%0A%09%09for(int j = 0; j %3C freezeRotation.length;j++)%7B%0A%09%09%09freezeRotation%5Bj%5D = false;%0A%09%09%7D%0A%09%7D%0A%09%0A%09public void update()%7B%0A%09%09super.update();%0A%09%09this.applyForce(new Vector3f(0,gravity,0));%0A%09%09collider.center(this.transform.position);%0A%09%09if(this.velocity.x%3C10%7C%7Cthis.velocity.y%3C10%7C%7Cthis.velocity.z%3C10 && !colliding)%7B%0A%09%09%09this.velocity.x += this.acceleration.x;%0A%09%09%09this.velocity.y += this.acceleration.y;%0A%09%09%09this.velocity.z += this.acceleration.z;%0A%09%09%7D%0A%09%09this.acceleration.x -= this.drag;%0A%09%09this.acceleration.y -= this.drag;%0A%09%09this.acceleration.z -= this.drag;%0A%09%0A%09%7D%0A%09%0A%09%0A%09%0A%09public void applyForce(Vector3f force)%7B%0A%09%09if(colliding)%7B%0A%09%09float forceX = force.x/this.mass;%0A%09%09float forceY = force.y/this.mass;%0A%09%09float forceZ = force.z/this.mass;%0A%09%09this.acceleration.x += forceX;%0A%09%09this.acceleration.y += forceY;%0A%09%09this.acceleration.z += forceZ;%0A%09%09%7D%0A%09%7D%0A%09%0A%09%0A%7D%0A

Create Rigidbody.java