Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbody Scale
#2
(18-01-2023, 07:48 PM)patriot4947 Wrote: Hi,

I have a softbody car and it is moving through x axis in 2d mode. I would like scale at the same time when I try to change scale of Obi Solver the car suddenly jumps forward because Obi solver scales from its centre. Is there any trick to solve this problem.

Hi!

Yes, you can translate the solver as well as scaling it. If you scale it by 0.5 in the X axis, translating it by 0.5*softbody.localPosition.x should keep the softbody from moving.

(18-01-2023, 07:48 PM)patriot4947 Wrote: I used LateUpdate to solve this problem. I am positioning car at late update but its position doesn't set.


You can't set the position of a softbody by setting its transform: it's made up of multiple particles, you need to move the particles themselves to translate it. You might want to do this manually using the particles API, or use softbody.Teleport(position, rotation);
Reply


Messages In This Thread
Softbody Scale - by patriot4947 - 18-01-2023, 07:48 PM
RE: Softbody Scale - by josemendez - 19-01-2023, 08:59 AM
RE: Softbody Scale - by patriot4947 - 21-01-2023, 06:13 PM