eth-ait / aitviewer

A set of tools to visualize and interact with sequences of 3D data.
MIT License
497 stars 46 forks source link

How to disable the adptive ground level? #48

Closed kunkun0w0 closed 5 months ago

kunkun0w0 commented 5 months ago

Hi! Thanks for developing this amazing visualization tool.

I met a problem when I tried to add a sphere to the scene. Here is my code:

sphere = trimesh.creation.icosphere(subdivisions=3, radius=1.0)
vertices = sphere.vertices
faces = sphere.faces
sphere_Meshes = Meshes(vertices, faces, gui_affine=False, color=(0.5, 0.5, 0.5, 1.0), name="obstacle")
v.scene.add(sphere_Meshes)

And here is my result: image

The center of the sphere is supposed on the origin of the coordinate system. So the ground floor should cut the sphere into halves. However, the aitviewer seems to automatically help me to change the ground level to make sure all the objects are above the surface.

So how can I disable this function?

ramenguy99 commented 5 months ago

Hi! You can set the following variable to disable the automatic floor adjustment:

viewer.auto_set_floor = False