mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix minor marble bugs on first tick
This commit is contained in:
parent
9c37c010e2
commit
728ac46367
1 changed files with 7 additions and 1 deletions
|
|
@ -189,6 +189,8 @@ class Marble extends GameObject {
|
|||
|
||||
public var prevPos:Vector;
|
||||
|
||||
var _firstTick = true;
|
||||
|
||||
public function new() {
|
||||
super();
|
||||
var geom = Sphere.defaultUnitSphere();
|
||||
|
|
@ -1195,7 +1197,10 @@ class Marble extends GameObject {
|
|||
|
||||
it++;
|
||||
|
||||
if (!this._firstTick)
|
||||
this.findContacts(collisionWorld, tempState);
|
||||
else
|
||||
this._firstTick = false;
|
||||
var cmf = this.computeMoveForces(m);
|
||||
var isCentered:Bool = cmf.result;
|
||||
var aControl = cmf.aControl;
|
||||
|
|
@ -1437,5 +1442,6 @@ class Marble extends GameObject {
|
|||
this.shockAbsorberEnableTime = Math.NEGATIVE_INFINITY;
|
||||
this.helicopterEnableTime = Math.NEGATIVE_INFINITY;
|
||||
this.lastContactNormal = new Vector(0, 0, 1);
|
||||
this._firstTick = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue