Jben
Member
|
[Anim] Jump Editor/Code
hello,
I have questions about the animations.
I want to add animation to my character jump.
I do not understand how trigger parameter obj Jump
I tried to add the code. but it does not work
- I add "Jump" a HumanObj in EEditor
Do you have any solutions?
Exp:
Kb.b (KB.SPACE) => Jump anim
thank you very much
|
|
11-06-2014 09:02 PM |
|
Jben
Member
|
RE: [Anim] Jump Editor/Code
My Code:
Quote:void operator=(ChrVisuals &cv) // Animation homme
{
mesh=cv.mesh; if(!mesh )Exit("Neighbor no mesh");
skel.create(mesh->skeleton(), scale); if(!skel.skeleton())Exit("Neighbor no skeleton");
stand =&skel.getSkelAnim(AnimationFile));
walk =&skel.getSkelAnim(AnimationFile));
run =&skel.getSkelAnim(AnimationFile));
crouch =&skel.getSkelAnim(AnimationFile));
crouch_f=&skel.getSkelAnim(AnimationFile));
jump =&skel.getSkelAnim(AnimationFile)); //add by me
}
Jump no work :/
|
|
11-09-2014 09:27 PM |
|
Jben
Member
|
RE: [Anim] Jump Editor/Code
Nobody can help me?
|
|
11-13-2014 07:37 PM |
|
Houge
Member
|
RE: [Anim] Jump Editor/Code
I think you need to manually call jump animation when jumping. I don't really know because i didn't do that.
|
|
11-13-2014 08:00 PM |
|
Jben
Member
|
RE: [Anim] Jump Editor/Code
Thank you! you have a sample code? I copy the tutorials code anim but no work.
2 weeks that I turn around: /
|
|
11-13-2014 08:16 PM |
|
Jben
Member
|
RE: [Anim] Jump Editor/Code
no work :/
I can not be encoded correctly in Player.cpp or Neighbor
I add Jump Motion but no work anim press SPACE BAR.
Code:
void operator=(ChrVisuals &cv)
{
mesh=cv.mesh; if(!mesh )Exit("Neighbor no mesh");
skel.create(mesh->skeleton(), scale); if(!skel.skeleton())Exit("Neighbor no skeleton");
stand =&skel.getSkelAnim(UID(3641177940, 1132381392, 1210010813, 4084050988));
walk =&skel.getSkelAnim(UID(1983665466, 1153337986, 918137271, 3006770702));
run =&skel.getSkelAnim(UID(315075647, 1091384318, 1781654959, 467571819));
crouch =&skel.getSkelAnim(UID(3554041741, 1084667415, 4179101885, 1978040740));
crouch_f=&skel.getSkelAnim(UID(4160384656, 1088923654, 2153346485, 2151493329));
jump =&skel.getSkelAnim(UID(2778466276, 1211467361, 3023440309, 521328235));
}
(This post was last modified: 11-15-2014 07:22 PM by Jben.)
|
|
11-15-2014 07:18 PM |
|
Seba
Member
|
RE: [Anim] Jump Editor/Code
I have only old code from 1.0 version:
Player.h
Quote:SkelAnim *sac_Jump;
Bool jump;
Player.cpp
Quote:sac_Jump=&cskel.getSkelAnim("Obj/Chr/Momo/Momo_Jump.anim");
Player::Update
Quote:onGround = ctrl.onGround();
if(Kb.bp(KB_SPACE) && onGround)
{
input.jump = 4.0;
jump = true;
}
else
{
input.jump = 0;
if(onGround)
jump = false;
}
PLAYER::animate()
Quote:cskel.animate(sac_Jump, ctrl.timeInAir()*0.9, LerpCube(0,1,jump),true);
Don't know if this work the same in new version.
|
|
11-15-2014 09:25 PM |
|
Jben
Member
|
RE: [Anim] Jump Editor/Code
Thanks I'll test
|
|
11-15-2014 10:31 PM |
|