sprinting/physics work
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
557b6da7de
commit
5c5ba32df7
@ -174,7 +174,7 @@
|
||||
"priorityCategory" : "CORE_MOVEMENT"
|
||||
},
|
||||
"sprintSystem" : {
|
||||
"modifier" : 1.4,
|
||||
"modifier" : 2.0,
|
||||
"staminaMax" : 500,
|
||||
"animationStartUp" : {
|
||||
"nameThirdPerson" : "Sprint",
|
||||
|
||||
@ -2069,6 +2069,7 @@ Fix sprint animation data
|
||||
Color uniform on meshes
|
||||
Fall and gravity tree fixes
|
||||
Potential window fix
|
||||
Sprinting/physics work
|
||||
|
||||
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ public class ClientSimulation {
|
||||
//
|
||||
//simulate bullet physics engine step
|
||||
if(EngineState.EngineFlags.RUN_PHYSICS){
|
||||
Globals.clientState.clientSceneWrapper.getCollisionEngine().simulatePhysics((float)Globals.engineState.timekeeper.getSimFrameTime());
|
||||
Globals.clientState.clientSceneWrapper.getCollisionEngine().simulatePhysics();
|
||||
Globals.clientState.clientSceneWrapper.getCollisionEngine().updateDynamicObjectTransforms();
|
||||
}
|
||||
|
||||
|
||||
@ -313,9 +313,8 @@ public class CollisionEngine {
|
||||
|
||||
/**
|
||||
* Performs the collision and simulation phases for this collision engine
|
||||
* @param time The time to increment the physics simulation by
|
||||
*/
|
||||
public void simulatePhysics(float time){
|
||||
public void simulatePhysics(){
|
||||
Globals.profiler.beginCpuSample("physics");
|
||||
spaceLock.lock();
|
||||
// remove all contact joints
|
||||
@ -1217,7 +1216,7 @@ public class CollisionEngine {
|
||||
protected DBody createDBody(DGeom ...geom){
|
||||
spaceLock.lock();
|
||||
DBody body = OdeHelper.createBody(world);
|
||||
body.setDamping(DEFAULT_LINEAR_DAMPING, DEFAULT_ANGULAR_DAMPING);
|
||||
// body.setDamping(DEFAULT_LINEAR_DAMPING, DEFAULT_ANGULAR_DAMPING);
|
||||
body.setMaxAngularSpeed(DEFAULT_MAX_ANGULAR_SPEED);
|
||||
if(geom != null){
|
||||
for(int i = 0; i < geom.length; i++){
|
||||
|
||||
@ -64,7 +64,7 @@ public class Main {
|
||||
/**
|
||||
* target amount of time per frame
|
||||
*/
|
||||
public static float targetFrameRate = 144.0f;
|
||||
public static float targetFrameRate = 60.0f;
|
||||
/**
|
||||
* Target period per frame
|
||||
*/
|
||||
|
||||
@ -264,7 +264,7 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
||||
// System.out.println(movementVector + " " + velocity * Main.deltaTime);
|
||||
|
||||
//state machine
|
||||
switch(state){
|
||||
switch(this.state){
|
||||
case STARTUP: {
|
||||
CreatureUtils.setFacingVector(parent, facingVector);
|
||||
rotation.set(movementQuaternion);
|
||||
@ -431,6 +431,9 @@ public class ServerGroundMovementTree implements BehaviorTree {
|
||||
} break;
|
||||
case IDLE: {
|
||||
} break;
|
||||
default: {
|
||||
throw new Error("Unsupported state!? " + this.state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -243,7 +243,7 @@ public class Realm {
|
||||
//
|
||||
//simulate bullet physics engine step
|
||||
if(EngineState.EngineFlags.RUN_PHYSICS){
|
||||
collisionEngine.simulatePhysics((float)Globals.engineState.timekeeper.getSimFrameTime());
|
||||
collisionEngine.simulatePhysics();
|
||||
collisionEngine.updateDynamicObjectTransforms();
|
||||
PhysicsEntityUtils.serverRepositionEntities(this,collisionEngine);
|
||||
chemistryEngine.collide();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user