|
@@ -149,6 +149,7 @@ export class Ball extends Entity
|
149
|
149
|
|
150
|
150
|
if(position.x > 60) {
|
151
|
151
|
impostor.mass = 1; // enable gravity
|
|
152
|
+ this._positionWhenThrown.copyFrom(mesh.absolutePosition);
|
152
|
153
|
this._state = 'throwing';
|
153
|
154
|
}
|
154
|
155
|
}
|
|
@@ -209,7 +210,6 @@ export class Ball extends Entity
|
209
|
210
|
-magnitude * Math.cos(SHOOT_ANGLE)
|
210
|
211
|
);
|
211
|
212
|
|
212
|
|
- this._positionWhenThrown.copyFrom(this._mesh.absolutePosition);
|
213
|
213
|
this._mesh.physicsImpostor.applyImpulse(impulse, this._mesh.absolutePosition);
|
214
|
214
|
this._state = 'thrown';
|
215
|
215
|
}
|