Update leenkx/Sources/leenkx/trait/physics/bullet/PhysicsWorld.hx
This commit is contained in:
@ -7,6 +7,7 @@ import iron.system.Time;
|
|||||||
import iron.math.Vec4;
|
import iron.math.Vec4;
|
||||||
import iron.math.Quat;
|
import iron.math.Quat;
|
||||||
import iron.math.RayCaster;
|
import iron.math.RayCaster;
|
||||||
|
import leenkx.trait.physics.PhysicsCache;
|
||||||
|
|
||||||
class Hit {
|
class Hit {
|
||||||
|
|
||||||
@ -145,7 +146,7 @@ class PhysicsWorld extends Trait {
|
|||||||
|
|
||||||
iron.Scene.active.notifyOnRemove(function() {
|
iron.Scene.active.notifyOnRemove(function() {
|
||||||
sceneRemoved = true;
|
sceneRemoved = true;
|
||||||
leenkx.trait.physics.PhysicsCache.clearCache();
|
PhysicsCache.clearCache();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,7 +305,7 @@ class PhysicsWorld extends Trait {
|
|||||||
var t = Time.fixedStep * timeScale * Time.scale;
|
var t = Time.fixedStep * timeScale * Time.scale;
|
||||||
if (t == 0.0) return; // Simulation paused
|
if (t == 0.0) return; // Simulation paused
|
||||||
|
|
||||||
leenkx.trait.physics.PhysicsCache.clearContactsCache();
|
PhysicsCache.clearContactsCache();
|
||||||
|
|
||||||
#if lnx_debug
|
#if lnx_debug
|
||||||
var startTime = kha.Scheduler.realTime();
|
var startTime = kha.Scheduler.realTime();
|
||||||
|
Reference in New Issue
Block a user