25-10-2021, 10:42 AM
Hi all,
I am trying to set the inverse masses of my obi softbody however, it crashes when settting it to a non 0 value with the error:
transform.position assign attempt for 'Cluster0' is not valid. Input position is { NaN, NaN, NaN }.
UnityEngine.Transformet_position (UnityEngine.Vector3)
Obi.ObiSoftbodySkinner:UpdateBones (Obi.ObiActor) (at Assets/Obi/Scripts/Softbody/Rendering/ObiSoftbodySkinner.cs:130)
Obi.ObiActor:Interpolate () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:1207)
Obi.ObiSoftbody:Interpolate () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbody.cs:289)
I am setting the inverse masses like this:
I also call:
after setting the inverse masses.
Is there something I miss?
I am not sure if it is relevant but, I also change some of the shape matching constraints of the body.
Kind regards,
Jasper
I am trying to set the inverse masses of my obi softbody however, it crashes when settting it to a non 0 value with the error:
transform.position assign attempt for 'Cluster0' is not valid. Input position is { NaN, NaN, NaN }.
UnityEngine.Transformet_position (UnityEngine.Vector3)
Obi.ObiSoftbodySkinner:UpdateBones (Obi.ObiActor) (at Assets/Obi/Scripts/Softbody/Rendering/ObiSoftbodySkinner.cs:130)
Obi.ObiActor:Interpolate () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:1207)
Obi.ObiSoftbody:Interpolate () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbody.cs:289)
I am setting the inverse masses like this:
Code:
public void setGroupInvMasses()
{
foreach (int index in obiParticleGroup.particleIndices)
obiActor.solver.invMasses[obiActor.solverIndices[index]] = inverseMasses;
}
I also call:
Code:
ObiSoftbody.UpdateParticleProperties()
Is there something I miss?
I am not sure if it is relevant but, I also change some of the shape matching constraints of the body.
Kind regards,
Jasper