Skip to content

Commit c9b5b60

Browse files
authored
Merge pull request #1994 from INEEDSSD/LayaAir_3.2
fix: Fixed rigidbody linear velocity method resetting value issue.
2 parents 00f70d8 + 1960c62 commit c9b5b60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/layaAir/laya/physics/RigidBody.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ export class RigidBody extends Component {
573573
*/
574574
setVelocity(velocity: IV2): void {
575575
if (!this._body) this._onAwake();
576+
this._linearVelocity = velocity;
576577
Physics2D.I._factory.set_rigidBody_linearVelocity(this._body, velocity);
577578
}
578579

0 commit comments

Comments
 (0)