Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Root Motion WIP #798

Closed
wants to merge 2 commits into from
Closed

Conversation

Almahmudrony
Copy link
Contributor

@Almahmudrony Almahmudrony commented Feb 9, 2024

  • Root Motion For WI
    Its not the best solution(Kinda Hacky) but it will work for general purpose.
    If someone is very good at math please contact me([email protected])

  • Rules to follow for perfect Root Motion Implementation
    Root bone must be point upward(Like a default bone in Blender).
    Root boot should touch the ground always.
    When animating Character Root bone ROTATION can only be animated in UP axis(Ex. In Blender its Z Axis rotation).
    When animating Character Root bone POSITION can be animated for XYZ, No problem.

  • Application in Engine.
    Enable RootMotion in AnimationComponent property window.
    Set the RootBone(name should be same as you name in your desired 3D modelling software)
    Attach a script component to AnimationComponent.
    Do not rotate character(in which you will apply root deltas from LUA) other than Y Axis,
    [Example: Lua Code]

	local Tx,Ty,Tz = animation_comp.GetRootTranslation()
	character_transform.Translate(Vector(Tx,Ty,Tz))
	
	
	local Rx,Ry,Rz,Rw = animation_comp.GetRootRotation()
	character_transform.RotateQuaternion(Vector(Rx,Ry,Rz,Rw))

[ExampleProject: https://drive.google.com/file/d/14qRkTtcSYv6pTYCeCNbO9aEdA0X06wHc/view?usp=sharing ]

[Beast Character Copyright - Frictional games(Amnesia The Bunker.)]
https://frictionalgames.com/general-faq/#mod-monetisation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants