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

Jumping does not make the Character gain height #79

Open
ataulien opened this issue Aug 4, 2019 · 0 comments
Open

Jumping does not make the Character gain height #79

ataulien opened this issue Aug 4, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ataulien
Copy link
Contributor

ataulien commented Aug 4, 2019

I guess gravity should be turned of for while a Jumping animation is playing. Right now we're not even doing proper acceleration, but what we do can be found here:

// Note: Gravity is acceleration, but since the walker doesn't support falling, just apply it
// as a velocity FIXME: Actual gravity!
const float frameDelta = bs::gTime().getFixedFrameDelta();
bs::Vector3 gravity = bs::Vector3(0, -9.81f, 0); // gPhysics().getGravity();
auto flags = mCharacterController->move(rootMotion + gravity * frameDelta);

The harder part of this issue is to find out for which animations the gravity should be disabled. There is a FLY flag on some animations inside HumanS.mds, of which I thought it would be only used for actual flying creatures like Bloodflys. Wasn't there some gravity on Bloodflys as well?

@ataulien ataulien added the enhancement New feature or request label Aug 4, 2019
@ataulien ataulien self-assigned this Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant