0
$\begingroup$

I have a simple script displaying a falling softbody position, but unfortunately it always returns the original position:

sph = bpy.data.objects["Sphere"]
sphLoc = sph.matrix_world.translation
print(sphLoc)

Output:

<Vector (0.0000, 0.0000, 5.6295)>
<Vector (0.0000, 0.0000, 5.6295)>
<Vector (0.0000, 0.0000, 5.6295)>
<Vector (0.0000, 0.0000, 5.6295)>
<Vector (0.0000, 0.0000, 5.6295)>
<Vector (0.0000, 0.0000, 5.6295)>

This works fine for a RIGID Body but not for a SOFT body. How can I retrieve a position of a Soft Body ? Using Blender 2.93. Thanks

$\endgroup$
1

1 Answer 1

0
$\begingroup$

For simplicity reasons, I decided to take the center of the object's bounding box:

bb=bpy.data.objects["Sphere"].bound_box
center=((bb[0][0] + bb[5][0])/2, (bb[0][1] + bb[5][1])/2, (bb[0][2] + bb[5][2])/2)
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .