mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix pathedinterior bug
This commit is contained in:
parent
f89e557662
commit
ee73aacdba
2 changed files with 6 additions and 6 deletions
|
|
@ -105,7 +105,8 @@ class PathedInterior extends InteriorObject {
|
|||
if (this.baseScale.z == 0)
|
||||
this.baseScale.z = 0.0001;
|
||||
|
||||
this.setRotationQuat(this.baseOrientation);
|
||||
this.setRotationQuat(this.baseOrientation.clone());
|
||||
this.collider.setTransform(this.getTransform());
|
||||
|
||||
this.path = cast this.simGroup.elements.filter((element) -> element._type == MissionElementType.Path)[0];
|
||||
|
||||
|
|
@ -161,6 +162,7 @@ class PathedInterior extends InteriorObject {
|
|||
}
|
||||
|
||||
var transform = this.getTransformAtTime(this.getInternalTime(thisTime));
|
||||
this.setTransform(transform);
|
||||
|
||||
var position = transform.getPosition();
|
||||
this.prevPosition = this.currentPosition;
|
||||
|
|
@ -243,10 +245,8 @@ class PathedInterior extends InteriorObject {
|
|||
}
|
||||
|
||||
function updatePosition() {
|
||||
var tform = this.collider.transform.clone();
|
||||
tform.setPosition(this.currentPosition);
|
||||
this.setTransform(tform);
|
||||
this.collider.setTransform(tform);
|
||||
this.setPosition(this.currentPosition.x, this.currentPosition.y, this.currentPosition.z);
|
||||
this.collider.setTransform(this.getTransform());
|
||||
this.collider.velocity = this.velocity;
|
||||
|
||||
if (this.soundChannel != null) {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class Grid {
|
|||
var surfaces:Array<CollisionSurface> = [];
|
||||
|
||||
public function new(bounds:Bounds) {
|
||||
this.bounds = bounds;
|
||||
this.bounds = bounds.clone();
|
||||
|
||||
this.cellSize = new Vector(bounds.xSize / CELL_DIV.x, bounds.ySize / CELL_DIV.y, bounds.zSize / CELL_DIV.z);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue