13-12-2020, 02:20 AM
(10-12-2020, 09:31 PM)josemendez Wrote: Hi,Alright, so I tried doing this and scaling the force by the size to different degrees, but it seems to always exhibit the same behavior. For example, I tried squaring the force vector I plugged in and it still started reversing at around the same time (but at faster speeds).
The way you transform vectors from world space to local space in Unity is by using: https://docs.unity3d.com/ScriptReference...ector.html
This is what I changed the code to:
Code:
_softbody.AddForce(_softbody.solver.transform.InverseTransformVector(Vector3.forward * _acceleration), ForceMode.Acceleration);
This is the behavior without scaling the force vector based on transform scale:
And this is what happens when using the scaled force vector with the code above:
Should I be manipulating this force vector in some other way, or should I take another approach altogether?
Thanks again for the help!