Player origins

Posted By: MAGA

Player origins - 01/13/09 09:49

I use knight model, and origin is not in the middle it is unde his feet, in game there is space bettwen players feet and ground! What I have to do? I dont whant to change player origins position, becouse there will be problem with animation.
Posted By: croman

Re: Player origins - 01/13/09 12:52

" in game there is space bettwen players feet and ground! "
it's probably because of z offset in your gravity code. can you post your gravity code here?
Posted By: Pappenheimer

Re: Player origins - 01/13/09 13:24

The origin of the model shouldn't be under its feet under no circumstances, because you will get problems with collision and shadow.
If it affects your model's animation, then there is something basically wrong with that animation - maybe, you can describe what sort of problem you have with the animation, and I can help you.
Posted By: MAGA

Re: Player origins - 01/13/09 14:29

If I use any kind of code! For example ninja code from AUM or Zelda code.
I think problem is in here
vec_set(temp,my.x);
temp.z -= 4000; // calculate a position 4000 quants below the player
trace_mode = ignore_me+ignore_sprites+ignore_passable+ignore_models+use_box;
result = trace(my.x,temp);// subtract vertical distance to ground
my.z -= result;
but I can not fix it frown
About model, take for example this model
http://rapidshare.com/files/182799375/MODEL.mdl.html
Posted By: Pappenheimer

Re: Player origins - 01/13/09 14:50

You should change the position of the model within MED that its origin is not at its feet's position but higher, at its knees.
For this click the Auto Scene Range button near the play animation button to assure that the model will be moved in all frames when you move it down a bit.

It is not a problem of the code, but you can set this in the beginning of the entity's action "c_setminmax(me);". Don't miss to have a close look into the manual about this and all the related stuff of collision.
Posted By: MAGA

Re: Player origins - 01/13/09 19:10

If I set "c_setminmax(me);" there is a problem with collision, player do not stop falling afther jump frown and there is still space between his feet and ground frown about MED I've tryed Auto Scene Range button, but looks like it doesn't work.... Even with it I have to change every frame, problem is that in my models there are more then 400 frames frown
Posted By: MAGA

Re: Player origins - 01/13/09 20:02

I've got how that works wink Thanks, but is there any whay to fix that problem without changing animation? For example in Glorious Combat players origin same as mine, but there is no problem!
© 2024 lite-C Forums