JLPM22 / MotionMatching

Motion Matching implementation for Unity
https://jlpm22.github.io/motionmatching-docs
MIT License
360 stars 40 forks source link

Documentation and Verticality #5

Open BrownMouseStudios opened 6 months ago

BrownMouseStudios commented 6 months ago

Hi I'm loving the project I've been diving into the code to see if there is anything I can contribute

I'm wondering about two things though

1)Is there any planned timeline for when the Reference in documentation will be updated? Or any updates at all for that matter?

2)I was wondering if this system could hypothetically support moving up along Y axis? I tried to force the transform of the controls to move up along Y axis but it keeps snapping back to the ground plane so I suspect there is some system in place that forces that behaviour. Because I would like the character to go up stairs or slopes. Or maybe I need to provide some animations for that too? Any insight or advice on this would be great

JLPM22 commented 5 months ago

Hi! Thank you very much for your interest on the project! All feedback and contributions are appreciated :)

Regarding the reference documentation I will try to do it as soon as possible, hopefully in April or May.

These days I have been abroad, next week when I return I will check the best way to implement the Y axis movement. I will keep this issue open to get back to you!

strangeways-dev commented 5 months ago

Hi I'm loving the project I've been diving into the code to see if there is anything I can contribute

I'm wondering about two things though

1)Is there any planned timeline for when the Reference in documentation will be updated? Or any updates at all for that matter?

2)I was wondering if this system could hypothetically support moving up along Y axis? I tried to force the transform of the controls to move up along Y axis but it keeps snapping back to the ground plane so I suspect there is some system in place that forces that behaviour. Because I would like the character to go up stairs or slopes. Or maybe I need to provide some animations for that too? Any insight or advice on this would be great

Did you ever figure out how to add Verticality?

JLPM22 commented 5 months ago

Hi!

I've had some time to implement a simple example of how to add verticality. The example can be found when updating to version 0.1.3 in the new sample scene JLSceneColliders.unity. The idea is that I have added a public function SetFloorHeight(...) in MotionMatchingSkinnedMeshController.cs (the one responsible for handling retargeting from Motion Matching to Unity characters) that allows setting a height for the floor. This integrates with the rest of the system and correctly updated Motion Matching internal systems. Then the new CollisionsSpringCharacterController.cs based on SpringCharacterController.cs uses raycasts to detect the height of the floor.

Note that, ideally, we would have a motion capture database with animations in slopes, climbing, etc., and we would define features for that. I hope to provide examples and motion capture data in the future. However, for now, setting the floor height should work!