Falling towards new 'floor' and aligning with it's normal

AntL

Member
Hi there, I'm after advice as how to achieve something a little bespoke with the package. In the first image, I'm changing the character's gravity (so the quad marked with the 'x' effectively becomes the new floor). What I'd like to achieve is the character falling towards this quad (the new floor) while rotating and aligning to the normal of the quad. This seems similar to the functionality the package currently supports - dynamic gravity and aligning to floor - but I can't quite achieve these results. Is there an obvious workaround that springs to mind so this is achievable?
Thanks, and great package!



1539807831199.png

1539807892044.png

1539807921603.png
 

Attachments

  • 1539807797194.png
    1539807797194.png
    116.1 KB · Views: 0
Yeah I appreciate that, but if I tick AlignToGround, it does a raycast down, then it'll set the gravity to the normal of whatever it hits - therefore it's continually updating the gravity direction and trashing the gravity direction I've specified (ie the normal of the quad with the blue x). Rather than AlignToGround, I guess I'm after an 'alignToGravity' function - so when the normal of the wall with the blue X is set to gravity direction, the character falls towards it and rotates, so the characters local up matches the normal of that quad. Is this something that's achieveable? Perhaps an ability more than in the locomotion?
 
Ahh, I see. Things are starting to settle down and I'm planning on starting to add new features soon. I'd love to add this in one of the next updates - it should be pretty easy to add. The best way to add it right now would be to create a new ability that changes the rotation based on the gravity direction.
 
Ok cool. In the meantime I'll try myself. I assume I'm wanting to override the updateRotation function within the ability? Possibly reusing some of the code from CharacterLocomotion?
 
Last edited:
Top