New to everything~!!

Started by Mizuki Takase, April 24, 2006, 09:45:08 PM

Previous topic - Next topic

Mizuki Takase

Hihi~! I first off wanted to say that JPCT is an unbelieveably kick-ass 3D engine. I am still at awe at how simple the classes seem to be and how the first person shooter example is done in so few lines... After being inspired from watching a couple of JPCT's demos, I decided to try and see if I can make some sort of third person view game. I started by looking though the first person shooter source and I tried to understand it. I even played around with it by adding a couple of lines of code, as well as modifying some values and see what happens.

Currently, I am having problems trying to understand why I cannot get the model to land properly on the ground.

First off, I initialized the player's model and textures using this code... I also placed the model 100 units above the normal starting point so that I can see the model falling down and hopefully land properly...
texMan.addTexture("ctf_r",new Texture("3ds"+c+"ctf_r.png"));
player = new Object3D(Loader.loadMD2("3ds"+c+"tris.md2", 1f));
player.setTexture("ctf_r");
theWorld.addObject(player);
player.translate(STARTING_POS.x,STARTING_POS.y-100,STARTING_POS.z);


And then at the doMovement(), I decided to take out all the camera "landing" features and changed that to this...
SimpleVector playerPos=player.getTranslation();
SimpleVector dir=new SimpleVector(0, GRAVITY, 0);
dir=theWorld.checkCollisionEllipsoid(playerPos, dir, ELLIPSOID_RADIUS, 1);
player.translate(dir);


I noticed that if the scale of the model is 0.5 and less, the model will land on the ground properly like so...


If the model is scaled to anything higher than 0.5, then the model kinda goes though the floor like this...


Thank you in advance to anyone that can help me figure out the problem and also a HUGE THANK YOU to JPCT and its author~~! I really hope to get comfortable with the engine and eventually make something really nice with it~!

EgonOlsen

That's most likely caused by the y-component of ELLIPSOID_RADIUS being too low. Try to double its value and see if that helps, i.e. if it's (1,1.5,1) make if (1,3,1).

Mizuki Takase

Thanks~!!! It works!! One task down, so many more to go... :lol: I really appreciate the help that you have been giving to everyone as well as myself... Thanks!

Melssj5

Hey Misuki. Would you mind giving me your md2 model and texture?????
Nada por ahora

Mizuki Takase

Just to make sure, I want to say that the model is not mines. I did not make that model. Since I liked Devil Hunter Yohko, I decided to try out the model on JPCT, and loved the results.. Anyway, here is the model and texture. I do not seem to know where the original readme is for the model so that sucks...
http://www.cs.uno.edu/~tvle/misc/yohko.zip

Melssj5

Thanks a lot Mizuki. I wont use it for comercial purposes but just for testing a new project I am doing.
Nada por ahora