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
|
//stop body falling if it is
|
||||||
DBody body = PhysicsEntityUtils.getDBody(parent);
|
DBody body = PhysicsEntityUtils.getDBody(parent);
|
||||||
DVector3C linearVelocity = body.getLinearVel();
|
if(body != null){
|
||||||
body.setLinearVel(linearVelocity.get0(), 0, linearVelocity.get2());
|
DVector3C linearVelocity = body.getLinearVel();
|
||||||
//push parent up
|
body.setLinearVel(linearVelocity.get0(), 0, linearVelocity.get2());
|
||||||
body.addForce(0, currentJumpForce, 0);
|
//push parent up
|
||||||
body.enable();
|
body.addForce(0, currentJumpForce, 0);
|
||||||
|
body.enable();
|
||||||
|
}
|
||||||
if(currentFrame >= jumpFrames){
|
if(currentFrame >= jumpFrames){
|
||||||
GravityUtils.clientAttemptActivateGravity(parent);
|
GravityUtils.clientAttemptActivateGravity(parent);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user