Author Topic: New to everything~!!  (Read 3141 times)

Offline Mizuki Takase

  • int
  • **
  • Posts: 97
    • View Profile
New to everything~!!
« on: April 24, 2006, 09:45:08 pm »
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...
Code: [Select]
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...
Code: [Select]
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~!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
New to everything~!!
« Reply #1 on: April 24, 2006, 10:00:23 pm »
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).

Offline Mizuki Takase

  • int
  • **
  • Posts: 97
    • View Profile
New to everything~!!
« Reply #2 on: April 25, 2006, 12:58:33 am »
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!

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
New to everything~!!
« Reply #3 on: May 05, 2006, 12:00:27 am »
Hey Misuki. Would you mind giving me your md2 model and texture?????
Nada por ahora

Offline Mizuki Takase

  • int
  • **
  • Posts: 97
    • View Profile
New to everything~!!
« Reply #4 on: May 07, 2006, 11:05:56 am »
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

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
New to everything~!!
« Reply #5 on: May 07, 2006, 10:11:32 pm »
Thanks a lot Mizuki. I wont use it for comercial purposes but just for testing a new project I am doing.
Nada por ahora