forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
@ -460,6 +460,9 @@ class RigidBody extends iron.Trait {
|
||||
|
||||
transform.loc.set(tx, ty, tz, 1.0);
|
||||
transform.rot.set(tRot.x(), tRot.y(), tRot.z(), tRot.w());
|
||||
} else {
|
||||
transform.loc.set(currentPos.x(), currentPos.y(), currentPos.z(), 1.0);
|
||||
transform.rot.set(currentRot.x(), currentRot.y(), currentRot.z(), currentRot.w());
|
||||
}
|
||||
|
||||
if (object.parent != null) {
|
||||
|
||||
@ -495,8 +495,11 @@ class RigidBody extends Trait {
|
||||
}
|
||||
|
||||
var active = physics.bodyInterface.IsActive(bodyId);
|
||||
if (!active)
|
||||
if (!active) {
|
||||
// Activate body if sleeping
|
||||
physics.bodyInterface.ActivateBody(bodyId);
|
||||
return;
|
||||
}
|
||||
|
||||
// Read position and rotation from Jolt into cached state
|
||||
var p = physics.bodyInterface.GetPosition(bodyId);
|
||||
|
||||
Reference in New Issue
Block a user