vec_for_vertex and vec_for_bone affecting ent_animate

Posted By: JibbSmart

vec_for_vertex and vec_for_bone affecting ent_animate - 01/18/10 13:51

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
Posted By: jcl

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 01/18/10 14:28

When are you calling vec_for_vertex? Before, after, or inbetween the ent_anime calls? And are you resetting the animation before?
Posted By: JibbSmart

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 01/18/10 15:07

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
Posted By: jcl

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 01/18/10 15:11

Can you email the project to Support? We have to look into it.

vec_for_vertex and vec_for_bone indeed update the bones tree and transform the vertex. But this should not interfere with animation, and doesn't with our test projects. So we have to look into the project.
Posted By: JibbSmart

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 01/18/10 15:58

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
Posted By: jcl

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 01/25/10 07:40

Thanks for the model. This was indeed a bug and will be fixed in the next update.
Posted By: JibbSmart

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 01/25/10 15:12

Thanks very much jcl laugh

Jibb
Posted By: darkinferno

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 01/30/10 11:28

hey jcl, was the fixing of this bug already done? i seem to be experiencing it with my GE contest entry
Posted By: darkinferno

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 01/30/10 21:25

posted here because the problem seems related

http://www.youtube.com/watch?v=PBnQFNHd-t8

this 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=channel

this bug also shows up in my other games including the Goldeneye game submitted to the contest
Posted By: JibbSmart

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 02/02/10 21:44

Do you have the private beta? The bug fix hasn't been in a public beta just yet.

Jibb
Posted By: darkinferno

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 02/03/10 11:16

oh darn.. no i dont, which means i may have to be waiting ages for that frown i really wanted to fix the goldeneye game so it'd look less pathetic
Posted By: JibbSmart

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 02/03/10 16:53

jcl said that the problem only happens when you use vec_for_vertex or vec_for_bone after animating, so I was able to work around it by doing it before any animation (including ent_bonereset_all). This only worked well for me because I do all my movement before animation, so I don't know if it's useful in your situation.

I hope it is, though laugh

Jibb
Posted By: darkinferno

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 02/04/10 21:45

am attaching weapons to the characters body which needs to be done after anims..
Posted By: JibbSmart

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 02/05/10 03:27

Fair enough.
Posted By: ambe

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 02/12/10 23:47

Arg, now I'm plagued with this as well, gun moves with the bones, upper-body stays still. *cry*
Posted By: darkinferno

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 02/15/10 20:03

exactly... hope they release the fix soon, i cant do much with my 3ps system until then and coding a workaround for a bug that will be fixed isnt exactly on my todo list
Posted By: darkinferno

Re: vec_for_vertex and vec_for_bone affecting ent_animate - 03/06/10 12:22

well.. its been quite some time, no word?
© 2024 lite-C Forums