I’ve been working for a while, trying to implement the root motion in the blender. This is the best I have been able to do so far. download in the description. whoever wants to subscribe to the channel
Default gravity is already 9.8 for dynamic, etc. physics…
Question:
if jump frame > 15:
obj.gravity = -9.8
else:
obj.gravity = -9.8
Why?
You can completely remove this part, or do i miss something here?
Also with getActionFrame() defaults to 0, so this part will fail if you run an animation on an other layer
thanks for the feedback. I updated the script, then changed a few things… about gravity, in the video at 11:52 I zero out the gravity when the character jumps, so that’s why I need to restore the gravity to the normal value later.
This “player.py” script is just an example of what you can do, it is not for use in the game, so each one adapts to your needs. there is another video in which I explain a little better how to use each function for animations.
in the “RootMotion.py” script the “getActionFrame ()” part is just one more precaution, if you remove that part it will continue to function normally.
Thanks a lot for this. There seems to be very little information on root motion characters and other aspects (of more complex, or modern) character motion in UP/BGE, like IK foot placement for uneven ground, for example. Its wonderful when someone shares their experience, I’ll be sure to try to follow it when I get to that level.
It was nothing! this is true, there is very little about these subjects, I looked on the internet for something to help, but I only found about: unity, unreal etc … I hope you like the project.