obstacle avoidance
This commit is contained in:
+2
-2
@@ -58,9 +58,9 @@ class Hero{
|
||||
pc.update();
|
||||
let dlt = this.clock.getDelta();
|
||||
this.delta += dlt;
|
||||
if (this.delta > 0.016){
|
||||
this.characterControls.update(this.gameEngine.phy.world, this.delta, pc)
|
||||
if (this.delta > 0.00001){
|
||||
this.gameEngine.phy.step()
|
||||
this.characterControls.update(this.gameEngine.phy.world, this.delta, pc)
|
||||
this.delta = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user