from panda3d.core import *
from direct.showbase.ShowBase import ShowBase
base = ShowBase()
model = base.loader.loadModel("panda")
model.reparentTo(base.aspect2d)
model.setPosHprScale(0,0,-0.7, -30,30,0, 0.15,0.15,0.15)
base.run()
Result:
I have a program where I need 3d gizmos for manipulating the camera view, very similar to most 3d modelling programs.
I could attach it to the camera and set it to be rendered in front of everything else in the render scene graph, but the catch is these widgets need to be rendered orthographically, while the camera view can either be ortho or perspective.
I guess a custom DIsplayRegion can be set up, but that seems more work than needed here.
So I just tried to parent the widget geometry to aspect2d instead. Seems to work, except culling is not right.
Is there a solution to this, short of using custom display regions?