mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-12-24 08:52:43 +00:00
use fast transforms for colliders
This commit is contained in:
parent
fcbb7e3e28
commit
1a1ddc8fe3
2 changed files with 3 additions and 1 deletions
|
|
@ -104,6 +104,7 @@ class PathedInterior extends InteriorObject {
|
|||
|
||||
this.setRotationQuat(this.baseOrientation.clone());
|
||||
this.collider.setTransform(this.getTransform());
|
||||
this.collider.fastTransform = true;
|
||||
|
||||
this.path = cast this.simGroup.elements.filter((element) -> element._type == MissionElementType.Path)[0];
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ class CollisionEntity implements IOctreeObject implements IBVHObject {
|
|||
public var go:GameObject;
|
||||
|
||||
public var userData:Int;
|
||||
public var fastTransform:Bool = false;
|
||||
|
||||
public var difEdgeMap:Map<Int, dif.Edge>;
|
||||
|
||||
|
|
@ -73,7 +74,7 @@ class CollisionEntity implements IOctreeObject implements IBVHObject {
|
|||
if (this.transform.equal(transform))
|
||||
return;
|
||||
// Speedup
|
||||
if (Util.mat3x3equal(this.transform, transform)) {
|
||||
if (this.fastTransform && Util.mat3x3equal(this.transform, transform)) {
|
||||
var oldPos = this.transform.getPosition();
|
||||
var newPos = transform.getPosition();
|
||||
this.transform.setPosition(newPos);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue