Click or drag to resize
AB4D logo

ThirdPersonCameraCenterObject Property

Gets or sets an object that specifies the 3D object the camera is looking at. CenterObject can be Model3D, Visual3D or UIElement3D.

Namespace: Ab3d.Cameras
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public Object CenterObject { get; set; }

Property Value

Object
Remarks

To make the camera follow the CenterObject automatically, set the IsDynamicTarget property to true.

Note  Note
ThirdPersonCamera with set CenterObject cannot be previewed in Visual Studio Designer. The reason for this is that in Designer the NameScope is not defined and therefore the binding to the 3D object does not work.
Example

The following sample shows how to define the ThirdPersonCamera and set its CenterObject to PersonModel:

XAML
<cameras:ThirdPersonCamera Heading="-30" Attitude="-20" Bank="0" Distance="300"
                           CenterObject="{Binding ElementName=PersonModel}"/>
See Also