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
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