Movatterモバイル変換


[0]ホーム

URL:


Skip to content
This page

Simple Look At (3D)

Rotates towards, essentially look directly at, its target with an optional offset.

Video Example

Properties

look_at_target

Type:Node3D

Default: null

Determines whichNode3D should be looked at. ThePCam3D will update its rotational value as the target changes its position.


Setter

void set_look_at_target(Node3D target)

Example
gdscript
pcam.set_look_at_target(target_node)

Getter

Node3D get_look_at_target()

Example
gdscript
pcam.get_look_at_target()

look_at_offset

Type:Vector3

Default: null

Offsets the target'sVector3 position that thePCam3D is looking at.


Setter

void set_look_at_offset(Vector3 offset)

Example
gdscript
pcam.set_look_at_offset(Vector3(0.5,2.5,0))

Getter

Vector3 get_look_at_offset()

Example
gdscript
pcam.get_look_at_offset()

look_at_damping

Type:bool

Default: false

Applies a damping effect on theCamera3D's rotation. Leading to heavier / slower camera turning as the targeted node moves around.

This is useful to avoid sharp and rapid camera rotational movement.


Setter

void set_look_at_damping(bool enable)

Example
gdscript
pcam.set_look_at_damping(true)

Getter

bool get_look_at_damping()

Example
gdscript
pcam.get_look_at_damping()

look_at_damping_value

Type:float

Default: false

Defines the damping amount. The ideal range should be somewhere between 0-1, likely somewhere around 0.1-0.25.

Lower value = faster / sharper camera movement. Higher value = slower / heavier camera movement.


Setter

void set_look_at_damping_value(float damping_value)

Example
gdscript
pcam.set_look_at_damping_value(true)

Getter

float get_look_at_damping_value()

Example
gdscript
pcam.get_look_at_damping_value()

[8]ページ先頭

©2009-2025 Movatter.jp