Notifications
Clear all

[Closed] viewport.setTM and focus object

I working on a piece of script to manipulate viewport in selected object local space.
I did all the stuff for creating the view matrix and everything working fine… until I rotate the view manually. The view seem to focus far far away!
Do I have to scale the view matrix in Z axis? wich value? :curious:

😮 Who!! just tried to scale the view matrix, bad idea, perspective destroyed lol

2 Replies

[left]try setting…

[/left]
[left]

[/left]
[left]

viewport.setFocalDistance()

[/left]
[left]

[/left]
[left]to the distance from the “camera” to the target

[/left]

thanks klunk, didn’t know about that one. Still using good ol max9 at work.
This command appeared in 2008. Thanks anyway!