Skip to content

Look At Overview (3D) ​

Determines the rotational logic for a given PCam3D.

The different modes has different functionalities and purposes, so choosing the correct mode depends on what each PCam is meant to do.

Core Modes ​

image alt

Mimic​

The simplest of the available options. Effectively copies the rotational value of the targeted Node3D.

image alt

Simple​

Keeps a persistent forward direction towards a target.

image alt

Group​

Allows for multiple targets to be looked at. The camera will look at the centre of the assigned targets' Vector3 coordinate.

Properties ​

look_at_mode ​

Type: LookAtEnum

Default: None

Value is based on LookAtMode enum.

Look At ModeValue
NONE0
MIMIC1
SIMPLE2
GROUP3

Important

This property should not be changed during runtime, as such the setter for this has purposely been excluded.

To use another look_at_mode at runtime, switch to a separate PCam with the specific look_at_mode applied.


Getter ​

int get_look_at_mode()

Example
gdscript
pcam.get_look_at_mode()

up ​

Type: Vector3

Default: Vector3(0, 1, 0)

Defines the upward direction of the PhantomCamera3D when look_at_mode is set.

This value will be overriden if up_target is defined.


Setter ​

void set_up(Vector3 value)

Example
gdscript
pcam.set_up(Vector3(1, 1, 0))

Getter ​

Vector3 get_up()

Example
gdscript
pcam.get_up()

up_target ​

Type: Node3D

Default: null

Applies and continuously updates the up direction of the PhantomCamera3D based on this target when look_at_mode is set.

Setting a value here will override the up value.


Setter ​

void set_up_target(Node3D value)

Example
gdscript
pcam.set_up_target(node_target)

Getter ​

Node3D get_up_target()

Example
gdscript
pcam.get_up_target()

Methods ​

bool is_looking ​

Returns true if look_at_mode is not set to NONE and has a valid look_at_target.

Example
gdscript
pcam.is_looking()

Made with ♥ in Vitepress