mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-27 21:21:41 +00:00
fix marble teleporterr teleporting in wrong direction and fix finish animation while gyro
This commit is contained in:
parent
a6ab184ff9
commit
64c1cbdfe2
2 changed files with 5 additions and 1 deletions
|
|
@ -492,7 +492,7 @@ class Marble extends GameObject {
|
||||||
A = gWorkGravityDir.multiply(this._gravity);
|
A = gWorkGravityDir.multiply(this._gravity);
|
||||||
if (this.mode == Finish)
|
if (this.mode == Finish)
|
||||||
A = this.velocity.multiply(-16);
|
A = this.velocity.multiply(-16);
|
||||||
if (currentTime - this.helicopterEnableTime < 5) {
|
if (currentTime - this.helicopterEnableTime < 5 && this.mode != Finish) {
|
||||||
A = A.multiply(0.25);
|
A = A.multiply(0.25);
|
||||||
}
|
}
|
||||||
for (obj in level.forceObjects) {
|
for (obj in level.forceObjects) {
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,12 @@ class TeleportTrigger extends Trigger {
|
||||||
} else {
|
} else {
|
||||||
position = destination.vertices[0].add(new Vector(0, 0, 3)).add(pos); // destination.vertices[0].clone().add(new Vector(0, 0, 3));
|
position = destination.vertices[0].add(new Vector(0, 0, 3)).add(pos); // destination.vertices[0].clone().add(new Vector(0, 0, 3));
|
||||||
}
|
}
|
||||||
|
position.w = 1;
|
||||||
this.level.marble.prevPos.load(position);
|
this.level.marble.prevPos.load(position);
|
||||||
this.level.marble.setPosition(position.x, position.y, position.z);
|
this.level.marble.setPosition(position.x, position.y, position.z);
|
||||||
|
var ct = this.level.marble.collider.transform.clone();
|
||||||
|
ct.setPosition(position);
|
||||||
|
this.level.marble.collider.setTransform(ct);
|
||||||
if (this.level.isRecording) {
|
if (this.level.isRecording) {
|
||||||
this.level.replay.recordMarbleStateFlags(false, false, true, false);
|
this.level.replay.recordMarbleStateFlags(false, false, true, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue