marcomusy / vedo

A python module for scientific analysis of 3D data based on VTK and Numpy
https://vedo.embl.es
MIT License
2.03k stars 265 forks source link

Text3D follow_camera position error #1037

Open Oguked opened 8 months ago

Oguked commented 8 months ago

Text3D follow_camera() changes the position of the text and not just its orientation, as it's supposed to be.

image image

"""Lock an object orientation
to constantly face the scene camera"""
from vedo import *

sp = Sphere().wireframe()

verts = sp.vertices
tx1 = Text3D("Fixed Text", verts[10], s=0.07, depth=0.1, c="lb")
tx2 = Text3D("Follower Text", verts[144], s=0.07, c="lg")
tx2.follow_camera()

a = Arrows([[0,0,0]], [verts[144]], c='yellow', alpha=0.9, s=0.1, res=26)

fp = sp.flagpole("The\nNorth Pole", c='k6', rounded=True)
fp = fp.scale(0.4).follow_camera()

show(a, sp, tx1, tx2, fp, __doc__, bg='bb', axes=1).close()
marcomusy commented 8 months ago

Hi sorry for the late reply Yes - we are aware of this problem but for the moment I was not able to fix it :( I will continue investigating..