Show Posts

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.

Messages - Schwapp

Pages: [1]
Support / Re: Object3D.checkForCollisionEllipsoid(Unknown Source)
« on: September 11, 2011, 03:58:32 pm »
lol, the  8) should be a  8 )^^

Support / Object3D.checkForCollisionEllipsoid(Unknown Source)
« on: September 11, 2011, 03:56:46 pm »
I splitted um my Code which created a simple Scene and a moveable character.
Before i splitted it up to more classes (like player, or scene...) the collision worked fine.
But now I get  the exception you see in the title :

Object3D.checkForCollisionEllipsoid(Unknown Source)

The whole exception says:

Exception in thread "main" java.lang.NullPointerException
   at com.threed.jpct.Object3D.checkForCollisionEllipsoid(Unknown Source)
   at WWWGame.Game.loop(
   at WWWGame.Game.start(
   at Start.init(
   at Start.main(

So there must be a variable in line 131 which is null... but there isn't.

Thats the line:

moveRes = szene.getPlayer().getObject().checkForCollisionEllipsoid(moveRes,
            ellipsoid, 8);

All variabled are defined and not null.
Any idea what the problem is?

Support / Re: Collision problem
« on: August 24, 2011, 04:03:55 pm »
I discovered a new problem, the ground - collision works fine, but there's also a tree placed in the terrain file.
The Object3D just ignores the tree and walks right through...
I don't know how to solve it and I have no idea how somebody could help me, with these rare information...

German corner / Re: Object3D MOVEIN?
« on: August 20, 2011, 01:34:16 pm »
Alles klar, vorwärts bewege ich mit:
Code: [Select]
Code: [Select]
nach links:
Code: [Select]
nach rechts:
Code: [Select]
Danke für die Hilfe!

German corner / Object3D MOVEIN?
« on: August 19, 2011, 07:42:56 pm »
Hab' gerade den GermanCorner entdeckt :-)
Ich hoffe es stört niemanden, dass ich in so kurzer Zeit so viele Fragen habe...
Ich frage mich jetzt z.B. gerade, wie ich es schaffen kann, ein Object3D wie die Camera einfach in Blickrichtung zu bewegen.
Ich habe mir schon eine "fliegende" Kamera erstellt, die man mit den W,A,S,D - Tasten durch die Welt steuert und mit der Maus die Richtung bestimmt..
Dazu gibt es ja netterweise
Code: [Select]
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...
Wenn man nun aber W drückt um nach vorne zu gelangen, hängt das ja von der Blickrichtung der Kamera ab...
Ich habe wirklich schon viel herumprobiert und nach den richtigen Methoden gesucht, es ist aber noch nichts brauchbares dabei herausgekommen...
Ich habe es vor recht langer Zeit mal mit der JMonkeyEngine geschafft, ist aber schon recht lange her...
Weiß jemand Rat?

Support / Re: Collision problem
« on: August 17, 2011, 05:38:37 pm »
Again solved the problem, i've now done it to (2, 11, 2)
Thank you again  ;D

Support / Collision problem
« on: August 17, 2011, 12:46:06 am »
Hello again :)
Since the last problem was solved (thanks for that again) I got a new one.
I'm still working with a scene which has a terrain and a figure.
I'm trying out the Collision samples and have one problem:
When I say
Code: [Select]

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);
SimpleVector t = new SimpleVector(0, 1, 0);
t = character.checkForCollisionEllipsoid(t, ellipsoid, 1);
if (moveRes.length() > DAMPING) {
moveRes.makeEqualLength(new SimpleVector(0, 0, DAMPING));
} else {
moveRes = new SimpleVector(0, 0, 0);
Code: [Select]

it works not PERFECT.
The figure just falls half into the terrain.
Sorry, i can't explain it better in english, here a screenshot:
When  i don't use collisionModes, the figure just stands on top of the ground, whith collision it falls into the terrain...

Support / Re: 3Ds loading Bug???
« on: August 14, 2011, 10:37:37 pm »
Eer, i took
Code: [Select]
As i can see in the Version History of jPCT exists since 2004 (even longer i guess), why isn't it as well-known as the JMonkeyEngine or Ardor3D?

Support / Re: 3Ds loading Bug???
« on: August 14, 2011, 10:17:23 pm »
Setting the maxPolysVisible before creating the world solved the problem!
Thanks a lot!!!

Support / Re: 3Ds loading Bug???
« on: August 14, 2011, 09:34:11 pm »
Thanks for help,

I tried
Code: [Select]
Code: [Select]
Config.maxPolysVisible = 10000;and
Code: [Select]
world.setClippingPlanes(1, 2000);but the model still reduces itselv... i tried an other model, same effect.
The thing is, i have 2 Object3Ds, one is the terrain and one the character.
And only the caracter model reduces itselv, the terrain doesnt.
I just don't understand it

Support / 3Ds loading Bug???
« on: August 14, 2011, 02:07:40 pm »
I'm an absolutly beginner in jPCT and have a problem:
I'm trying to load a 3D Model which is exportet to .3ds from Blender.
So i load that model with a method from a tutorial:
Code: [Select]
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.rotateX((float) (-.5 * Math.PI));
temp.setRotationMatrix(new Matrix());
o3d = Object3D.mergeObjects(o3d, temp);;
return o3d;
I downloaded the model there:
But some parts of the model dissapear, depending on the camera-position.
An arm, the head or the whole body...
I never see the complete Figure, only peaces of it...

Any ideas?

I see now, the figure just dissapears like every other Model, when the camera moves too far away.
But this model begins earlier to dissapear than the others do.

Pages: [1]