Hi EgonOlse
I have tried to understand with my limited gaming knowledge. I have made changes to this method and tried to call in fps game loop as move(theWorld,mouse);
But did not work. could you plz help me out with this. Am i near to the solution
public void move(World world, MouseMapper mouse) {
SimpleVector pos = getPosition();
if (pos != null) {
pos.add(new SimpleVector(0, ellipsoid.y, 0));
SimpleVector dir = world.checkCollisionEllipsoid(pos, null, ellipsoid, 1);
pos.add(new SimpleVector(0, -ellipsoid.y, 0));
dir.x = 0;
dir.z = 0;
pos.add(dir);
setSpeed(dir);
pos.add(new SimpleVector(0, ellipsoid.y, 0));
Matrix rot = getRotation();
int dx = mouse.getDeltaX();
int dy = mouse.getDeltaY();
float ts = turnSpeed ;
float tsy = ts;
if (dx != 0) {
ts = Math.abs(dx) / -500f;
}
if (dy != 0) {
tsy = Math.abs(dy) / 500f;
}
if (dx < 0) {
viewRot.rotateAxis(viewRot.getYAxis(), ts);
rot.rotateY(ts);
}
if (dx > 0) {
viewRot.rotateAxis(viewRot.getYAxis(), -ts);
rot.rotateY( -ts);
}
pos.add(new SimpleVector(0, -ellipsoid.y, 0));
camera.setPosition(pos);
}
}
With Regards
San14