About Store Forum Documentation Contact



Post Reply 
Custom character
Author Message
b1s Offline
Member

Post: #1
Custom character
Hello again.
Couldn't find any information about the subject so here it goes.

We have been trying to change the player character to a custom one and found some issues.

I noticed that the head bone has a point that has something to do with mouselook.
After creating a custom skeleton char we noticed that mouse looks up axis didn't work correctly anymore. This was using the exact same code as before with the default player character.

Both the default and the custom skeletons have the same head bones and the head point is oriented in the same way.

are there some sort of limits coming from some where the skeleton or something?
The y axis gets slight movement but not complete 180 degrees.
More like 20 degrees up and 20 degrees down.
Any suggestion ideas what could cause this?
01-22-2010 09:19 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Custom character
there's also a small perpendicular line coming out from the skeleton point,
please make sure it points in the same direction as in other skeletons.

Quote:are there some sort of limits coming from some where the skeleton or something?
The y axis gets slight movement but not complete 180 degrees.
More like 20 degrees up and 20 degrees down.
what do you mean by that? can you make some screens?
01-22-2010 05:31 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #3
RE: Custom character
well the screens wouldnt help much.
basically the y axis dosent work at all. you can only mouselook horizontally not vertically.
the line points in the same direction as in the default skeleton.
that's in the head point. the head bone is backwards.
i tested to rotate it other way around but it did not help much.
(This post was last modified: 01-22-2010 05:50 PM by b1s.)
01-22-2010 05:47 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Custom character
use TPP camera, and check if your character bones (body bodyu neck head) get rotated correctly when you adjust player.angle values

this system works when you have bones named correctly, and in similar orientation to suggested in documentation - http://www.esenthel.com/wiki/index.php?title=Skeleton

if you don't have something like on the screens, then don't use angle.y, and just manually rotate the camera instead of using skeleton point by changing angle.y
01-22-2010 06:00 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #5
RE: Custom character
well the bones seem exactly the same.
there's no movement in the head bone.
the camera rotates well in thirdperson.
01-22-2010 06:48 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Custom character
you can send me the mesh+skel files Ill check
01-22-2010 06:53 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Custom character
I've just checked your file and bones rotate correctly, ( I tested model in World Editor\game)

but you have following errors:
-mesh was moved down (not synchronized with skeleton), had to move skeleton manually
-you have spine1 instead of bodyu
-you have additional "pelvis" bone, because of which "body" is not the main bone
-legs shouldnt have set parent to "body" but to no parent
-body and bodyu/spine1 have incorrectly set the perpendicular line direction
01-22-2010 07:18 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #8
RE: Custom character
these all affect the y axis of the mouselook?
01-22-2010 07:22 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Custom character
yes, I have sent you adjusted mesh+skel to your email
01-22-2010 07:24 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #10
RE: Custom character
its tested but the problem is still there.
this must be a problem with the code then.. i will test this skeleton in some of the tutorials and get back to you if i figure anything out.

strange thing is that the code worked fine with the default model..
(This post was last modified: 01-22-2010 07:32 PM by b1s.)
01-22-2010 07:30 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: Custom character
how did you test it?

I just put new object in World Editor, as player, set the mesh+skel and ran the game,

if youre doing it somehow else, then you must have wrong code
01-22-2010 07:33 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #12
RE: Custom character
mm. i will check things out..
ill get back to you when i have more information.
01-22-2010 07:38 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #13
RE: Custom character
ok.. custom animations seemed to cause this behaviour.
im still not sure tho how will i get animations that wont go over the head movement.
(This post was last modified: 01-22-2010 11:24 PM by b1s.)
01-22-2010 10:35 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #14
RE: Custom character
any idea why animations that i have created overwrite the head mouse movement?
i tried clearing the keys from head,bodys and neck.
01-23-2010 01:11 PM
Find all posts by this user Quote this message in a reply
Myx Offline
Member

Post: #15
RE: Custom character
It's probably something doing with the blending of the animations.

Code:
void Character::animate() {

__super::animate();

Flt blendValue = 0;
Flt blend = Lerp(1.0f, 0.8f, anim.stop_move * anim.walk_run);
AdjustValTarget(blendValue , Max(blend, 1.f), Tm.d() * 4, Tm.d() * 2);

cskel.animate( SkelAnim(*cskel.skeleton(), Animations("../data/anim/myAnim.anim")),
               m_AnimTimer, LerpCube(0, 1, blendValue), true);
}

I do something along those lines to blend my walk-animation with my attack-animations. m_AnimTimer is in this case a variable that is updated in the update() function. It's increased by Tm.d() each update.

Code:
m_AnimTimer += Tm.d();

I hope this was of some help. Good luck!
(This post was last modified: 01-23-2010 01:54 PM by Myx.)
01-23-2010 01:52 PM
Find all posts by this user Quote this message in a reply
Post Reply