mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 20:23:47 -04:00
Enabled widget lerpScale with fScaleWidgetByCam is on
This commit is contained in:
parent
21c61f82c6
commit
8bbe2f6376
@ -479,11 +479,12 @@ class DirectSession(DirectObject):
|
||||
taskMgr.remove('DIRECTWidgetResize')
|
||||
|
||||
def widgetResizeTask(self, state):
|
||||
dnp = self.selected.last
|
||||
if dnp:
|
||||
nodeCamDist = Vec3(dnp.getPos(direct.camera)).length()
|
||||
sf = 0.075 * nodeCamDist * math.tan(deg2Rad(direct.drList.getCurrentDr().fovV))
|
||||
self.widget.setDirectScalingFactor(sf)
|
||||
if not taskMgr.hasTaskNamed('resizeObjectHandles'):
|
||||
dnp = self.selected.last
|
||||
if dnp:
|
||||
nodeCamDist = Vec3(dnp.getPos(direct.camera)).length()
|
||||
sf = 0.075 * nodeCamDist * math.tan(deg2Rad(direct.drList.getCurrentDr().fovV))
|
||||
self.widget.setDirectScalingFactor(sf)
|
||||
return Task.cont
|
||||
|
||||
def select(self, nodePath, fMultiSelect = 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user