Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class BodyComponent : CollidableComponent
private float _sleepThreshold = 0.01f;
private byte _minimumTimestepCountUnderThreshold = 32;
private InterpolationMode _interpolationMode = InterpolationMode.None;
private BodyInertia _nativeIntertia;
private BodyInertia _nativeInertia;

/// <summary> Can be null when it isn't part of a simulation yet/anymore </summary>
[DataMemberIgnore]
Expand Down Expand Up @@ -60,7 +60,7 @@ public bool Kinematic
{
#warning Norbo: maybe setting bRef.LocalInertia is enough instead of getting and applying description ... ?
bRef.GetDescription(out var description);
description.LocalInertia = Kinematic ? new BodyInertia() : _nativeIntertia;
description.LocalInertia = Kinematic ? new BodyInertia() : _nativeInertia;
bRef.ApplyDescription(description);
}
}
Expand Down Expand Up @@ -422,7 +422,7 @@ protected override void AttachInner(NRigidPose pose, BodyInertia shapeInertia, T
{
Debug.Assert(Simulation is not null);

_nativeIntertia = shapeInertia;
_nativeInertia = shapeInertia;
if (Kinematic)
shapeInertia = new BodyInertia();

Expand Down