client jump tree body logic
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
6eb53acbb3
commit
44ae9909ee
@ -103,11 +103,13 @@ public class ClientJumpTree implements BehaviorTree {
|
||||
}
|
||||
//stop body falling if it is
|
||||
DBody body = PhysicsEntityUtils.getDBody(parent);
|
||||
DVector3C linearVelocity = body.getLinearVel();
|
||||
body.setLinearVel(linearVelocity.get0(), 0, linearVelocity.get2());
|
||||
//push parent up
|
||||
body.addForce(0, currentJumpForce, 0);
|
||||
body.enable();
|
||||
if(body != null){
|
||||
DVector3C linearVelocity = body.getLinearVel();
|
||||
body.setLinearVel(linearVelocity.get0(), 0, linearVelocity.get2());
|
||||
//push parent up
|
||||
body.addForce(0, currentJumpForce, 0);
|
||||
body.enable();
|
||||
}
|
||||
if(currentFrame >= jumpFrames){
|
||||
GravityUtils.clientAttemptActivateGravity(parent);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user