Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Softbody positioned far from the world origin move toward the origin unexpectedly
#2
(31-05-2019, 05:20 AM)kenjis Wrote: Hi,
I faced unexpected behavior of a softbody positioned far from the world origin.

Repro:
1. open BallPool sample scene.
2. create new GameObject with its name is 'Parent', its position is (0, 0, 0).
3. move existing GameObjects of 'Main Camera', 'TestEnvironment', 'ActorSpawner' and 'Ball' to under 'Parent' (to be Parent's children).
4. change Parent's position.x = 10000 (here, dare large)
changed like this

5. play the scene

Result:

The ball falls down and also moves rightward as like horizontal force was added.
It should fall down only along Y axis.
Might think the ball goes back to the world origin.

Do I missing setup something?
Thanks

Well, you're facing floating point precision problems. Shape matching constraints are specially sensitive to it. This is not at all unexpected, and one of the reasons why local space simulation exists. See:

http://obi.virtualmethodstudio.com/tutor...space.html

Quote from local space sim advantages:
Quote:The simulation can be very far away from the world's origin and still retain excellent floating point precision, as all quantities are expressed with respect to the solver's transform.

So the solution in this case would be to switch from world space sim to local space sim.

cheers,
Reply


Messages In This Thread
RE: Softbody positioned far from the world origin move toward the origin unexpectedly - by josemendez - 31-05-2019, 07:12 AM