Environment.SetView (Vector3D, Boolean, Int32, Boolean) Method

Sets the view direction of the camera to the specified direction.
Public Sub SetView( _ 
ByVal direction As Vector3D, _ 
ByVal fit As Boolean, _ 
Optional ByVal margin As Integer = 10, _ 
Optional ByVal selectedOnly As Boolean = false _ 
)
This language is not supported or no code example is available.
public void SetView( 
Vector3D direction
bool fit
int margin = 10, 
bool selectedOnly = false 
)
This language is not supported or no code example is available.

Parameters

direction
Vector3D

The new camera direction.

fit
bool

if true fits the scene in the viewport

margin
int

Pixels margin from the border, if fit is true

selectedOnly
bool

If fit is true, fits only the selected entities

Remarks
 
The orientation of the camera is performed with an animation if AnimateCamera is true. The direction points outside the screen, so the Camera is actually looking in the opposite direction.

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition