thanks Bruce,
I've it finally working,
and had a lot of trouble because of some strange timing issues:
Basically this is the code:
scene.forward = Temp_Forward
scene.up = Up
scene.forward = Forward
time.sleep ( 0.1 )
a = mag ( scene.mouse.camera ) / abs ( Scale )
scene.scale = a * scene.scale
where Up, Forward and Scale are a constants given by the designer.
Temp_Forward is a calculated value to prevent parallelism of Up and Forward
Now this only works,
if the delay of about 100 msec is inserted,
why ???
( I couldn't find anything in the documentation, but that happened
before ;-)
At other places I've also seen that scene.mouse.camera is the zero vector,
if placed to soon in the program.
Looks like a similar effect to me.
Any explanation ?
thanks,
Stef
Bruce Sherwood wrote:
> There really isn't a fully functional way, though see movecamera.py in
> the VPython 3 contributed programs.
>
> Bruce Sherwood
>
> Stef Mientki wrote:
>> hello,
>>
>> I've made an overview of VPython applications.
>> Now I can easily switch from 1 example to another,
>> reset all default values of the scene,
>> and watch another demo.
>>
>> But there's one parameter I can't find how to control,
>> and that's the user zoom.
>> It seems that the shown image is something like Range * UserZoom (if
>> it's called that way).
>>
>> Is there a way to reset the user zoom (VPython 3) ?
>>
>> thanks,
>> Stef Mientki
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Visualpython-users mailing list
>> Vis...@li...
>> https://lists.sourceforge.net/lists/listinfo/visualpython-users
>>
>
>
|