1
Support / Re: Object3D.checkForCollisionEllipsoid(Unknown Source)
« on: September 11, 2011, 03:58:32 pm »
lol, the should be a 8 )^^
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
character.translate(cam.getDirection());
rückwärts:character.translate(-cam.getDirection().x,-cam.getDirection().y,-cam.getDirection().z);
nach links:character.translate(-cam.getDirection().z,cam.getDirection().y,cam.getDirection().x);
nach rechts:character.translate(cam.getDirection().z,cam.getDirection().y,-cam.getDirection().x);
Danke für die Hilfe!
moveCamera(Camera.CAMERA_MOVEIN, 1);
Das gibt es beim Object3D nicht, dass kann ich nur bewegen, indem ich es an der X (Y,Z) - Achse versetze...
private SimpleVector moveRes = new SimpleVector(0, 0, 0);
private SimpleVector ellipsoid = new SimpleVector(2, 2, 2);
private static final float DAMPING = 0.1f;
moveRes=character.checkForCollisionEllipsoid(moveRes, ellipsoid, 8);
character.translate(moveRes);
SimpleVector t = new SimpleVector(0, 1, 0);
t = character.checkForCollisionEllipsoid(t, ellipsoid, 1);
character.translate(t);
if (moveRes.length() > DAMPING) {
moveRes.makeEqualLength(new SimpleVector(0, 0, DAMPING));
} else {
moveRes = new SimpleVector(0, 0, 0);
}
and
character.setCollisionMode(Object3D.COLLISION_CHECK_SELF);
terrain.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
it works not PERFECT.FrameBuffer.SAMPLINGMODE_HARDWARE_ONLY)
EDIT:Config.farPlane=3000;
,Config.maxPolysVisible = 10000;
andworld.setClippingPlanes(1, 2000);
but the model still reduces itselv... i tried an other model, same effect.private Object3D loadModel(String filename, float scale) {
Object3D[] model = Loader.load3DS(filename, scale);
Object3D o3d = new Object3D(0);
Object3D temp = null;
for (int i = 0; i < model.length; i++) {
temp = model[i];
temp.setCenter(SimpleVector.ORIGIN);
temp.rotateX((float) (-.5 * Math.PI));
temp.rotateMesh();
temp.setRotationMatrix(new Matrix());
o3d = Object3D.mergeObjects(o3d, temp);
o3d.build();
}
return o3d;
}
I downloaded the model there: http://e2-productions.com/repository/modules/PDdownloads/singlefile.php?cid=2&lid=161