2 registered members (AndrewAMD, 7th_zorro),
1,285
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
vec_for_vertex and vec_for_bone affecting ent_animate
#305916
01/18/10 13:51
01/18/10 13:51
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
G'day!
This is a little difficult to explain. My code mixes some animations using ent_animate(... ANM_ADD), and everything works smoothly. However, if I call vec_for_vertex or vec_for_bone even though it appears to be completely unrelated -- setting the camera position -- some of the animations fail.
The legs of my character are animated using ent_animate with no mode. The upper body of my character is then animated using ent_animate with ANM_ADD enabled, and the animation percentage is determined by the camera's tilt (with other factors keeping the animation percentage in the range of 0-100). This is so when the camera looks up, so does the character.
This normally works fine if the camera is attached to the character with simple vector functions that only consider the coordinates of his origin. However, if I have a function that attaches the camera's position to the model using vec_for_vertex or vec_for_bone, then the lower body will only animate if the upper-body's frame changes as well. That is, when the camera's tilt is not changing, and thus the upper body animation is not changing, the lower body will stay on the same frame.
I'll be happy to send you a cut-down version of the project if you need me to.
Thanks,
Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: vec_for_vertex and vec_for_bone affecting ent_animate
[Re: jcl]
#305929
01/18/10 15:07
01/18/10 15:07
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
I call vec_for_vertex or vec_for_bone (I tried both) after all the animation calls. I call ent_bonereset_all(me) before any animation.
Cheers,
Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: vec_for_vertex and vec_for_bone affecting ent_animate
[Re: jcl]
#305935
01/18/10 15:58
01/18/10 15:58
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Sure thing. I have a few iterations of this project I'm working on backed up, so I'll send in the simplest one that demonstrates the issue.
Thanks,
Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: vec_for_vertex and vec_for_bone affecting ent_animate
[Re: jcl]
#306876
01/25/10 15:12
01/25/10 15:12
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Thanks very much jcl Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: vec_for_vertex and vec_for_bone affecting ent_animate
[Re: darkinferno]
#307668
01/30/10 21:25
01/30/10 21:25
|
Joined: May 2009
Posts: 1,816 at my pc (duh)
darkinferno
Serious User
|
Serious User
Joined: May 2009
Posts: 1,816
at my pc (duh)
|
posted here because the problem seems related http://www.youtube.com/watch?v=PBnQFNHd-t8this is just to show a video of the bug i encountered after updating the gamestudio engine, this is the same game as before, with no code change, just the model was changed and the animations are now going all wrong, apparently it as to do with calling vec_for vertex/vec_for_bone on a model using ent_blend, thats what i assume because when i disable the vec_for_vertex which attaches the weapons, the model animates correctly, when i change weapons, the function using vec_for_vertex is paused for a second and you can see the anims run ok, if i constantly change weapons, the anims run fine, you can also see that even though the model isnt animated, the models are still in the correct position of what the model should be in, as if theyre still reading the animations correctly this is the same game running on an older engine version and all animations and weapons are in place: http://www.youtube.com/watch?v=KvIQ7f91q_4&feature=channelthis bug also shows up in my other games including the Goldeneye game submitted to the contest
|
|
|
Re: vec_for_vertex and vec_for_bone affecting ent_animate
[Re: darkinferno]
#308349
02/02/10 21:44
02/02/10 21:44
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Do you have the private beta? The bug fix hasn't been in a public beta just yet.
Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
|