sure didn't think of that oops
Entity.class
package net.game.entity;
import org.lwjgl.util.vector.Vector3f;
import net.game.world.*;
import static org.lwjgl.opengl.GL11.*;
public class Entity {
protected Vector3f position;
protected Vector3f rotation;
protected World world;
protected float gravity = 1.10f;
public Entity(){
position = new Vector3f(0, 0, 0);
rotation = new Vector3f(0, 0, 0);
world = new World(0, 0);
}
public void init(World world){
this.world = world;
}
protected void setPosition(float x, float y, float z){
position.x = x;
position.y = y;
position.z = z;
}
protected void setRotation(float rx, float ry, float rz){
rotation.x = rx;
rotation.y = ry;
rotation.z = rz;
}
public void translate(float x, float y, float z) {
position.x += x;
position.y += y;
position.z += z;
}
public void rotate(float x, float y, float z) {
rotation.x += x;
rotation.y += y;
rotation.z += z;
}
public void move(float xa, float za) {
position.x -= xa;
position.z -= za;
}
public Vector3f getPosition() {
return position;
}
public void update(){
}
public void render(){
glTranslatef(-position.x, world.y - 28.0f, -position.z);
glRotatef(rotation.x, 1, 0, 0);
glRotatef(rotation.y, 0, 1, 0);
glRotatef(rotation.z, 0, 0, 1);
}
}