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 - manumoi

Pages: 1 ... 7 8 [9]
Support / still not working
« on: June 01, 2005, 11:08:31 pm »
It must be something simple but it still doesn't work. Here is my code :

// used to init a model
public void loadModel(){
   model=Loader.loadMD2(PATH+SEP+"models"+SEP+"scarlet"+SEP+"tris.md2", 0.5f);
   TextureManager.getInstance().addTexture("alita2", new Texture(PATH+SEP+"models"+SEP+"scarlet"+SEP+"scarlet_dress_red.jpg"));
   model.rotateY(5f); // not the correct angle... just to see if it works
   model.setRotationMatrix(new Matrix());

// used to place the model in the world (at initialization and in the game loop)
public void placeModel(Object3D model){
   SimpleVector dropDown = new SimpleVector(0,1,0);   
   Matrix rotMat = model.getRotationMatrix();
   float distanceToGround = terrain.calcMinDistance(model.getTransformedCenter(), dropDown, 4*30);
   if (distanceToGround!= Object3D.COLLISION_NONE)
       distanceToGround -=10;

and here is a picture of the interface

My camera is well placed and follow the model when it is moving. I would like to rotate my model in order that I see its back (so I need to rotate it around the Y axis) and without interfering with axis.

I tested it with different md2 models... and all of them are looking on the right..

Do you see where my mistake is?

Thanks you


Pages: 1 ... 7 8 [9]