Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird physics behavior when using AddForce and changing scale of Solver
#6
(13-12-2020, 02:20 AM)picross Wrote: 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).

This is what I changed the code to: 
Code:
_softbody.AddForce(_softbody.solver.transform.InverseTransformVector(Vector3.forward * _acceleration), ForceMode.Acceleration);
It is definitely scaling the vector, but the same behavior seems to happen. 

This is the behavior without scaling the force vector based on transform scale:

[Image: e69a6f32c208e117cf250e761d2f3435.gif]
And this is what happens when using the scaled force vector with the code above:

[Image: 12190ef4da170733ca185c87495d85e1.gif]

Should I be manipulating this force vector in some other way, or should I take another approach altogether?

Thanks again for the help!
It appears we were able to solve most of our problems by moving the tube towards the player instead of moving the player, thus circumventing all the problems we were having in the first place.
Reply


Messages In This Thread
RE: Weird physics behavior when using AddForce and changing scale of Solver - by picross - 15-12-2020, 08:15 AM