mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Compare commits
1 Commits
v5.3.188
...
fix/force-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
12637f942c |
@@ -1365,6 +1365,7 @@ namespace gdjs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
applyImpulse(impulseX, impulseY, positionX, positionY) {
|
applyImpulse(impulseX, impulseY, positionX, positionY) {
|
||||||
|
|
||||||
// If there is no body, set a new one
|
// If there is no body, set a new one
|
||||||
if (this._body === null) {
|
if (this._body === null) {
|
||||||
this.createBody();
|
this.createBody();
|
||||||
@@ -1373,6 +1374,13 @@ namespace gdjs {
|
|||||||
// Wake up the object
|
// Wake up the object
|
||||||
this._body.SetAwake(true);
|
this._body.SetAwake(true);
|
||||||
|
|
||||||
|
console.log('ahem')
|
||||||
|
console.log(positionX, positionY);
|
||||||
|
console.log(this.b2Vec2Sec(
|
||||||
|
positionX * this._sharedData.invScaleX,
|
||||||
|
positionY * this._sharedData.invScaleY
|
||||||
|
))
|
||||||
|
|
||||||
// Apply the impulse
|
// Apply the impulse
|
||||||
this._body.ApplyLinearImpulse(
|
this._body.ApplyLinearImpulse(
|
||||||
this.b2Vec2(impulseX, impulseY),
|
this.b2Vec2(impulseX, impulseY),
|
||||||
@@ -1392,6 +1400,13 @@ namespace gdjs {
|
|||||||
// Wake up the object
|
// Wake up the object
|
||||||
this._body.SetAwake(true);
|
this._body.SetAwake(true);
|
||||||
|
|
||||||
|
console.log('ahem')
|
||||||
|
console.log(positionX, positionY);
|
||||||
|
console.log(this.b2Vec2Sec(
|
||||||
|
positionX * this._sharedData.invScaleX,
|
||||||
|
positionY * this._sharedData.invScaleY
|
||||||
|
))
|
||||||
|
|
||||||
// Apply the impulse
|
// Apply the impulse
|
||||||
angle = gdjs.toRad(angle);
|
angle = gdjs.toRad(angle);
|
||||||
this._body.ApplyLinearImpulse(
|
this._body.ApplyLinearImpulse(
|
||||||
|
Reference in New Issue
Block a user