Skip to main content

Lock NPC Camera Bound

Lock the camera around an NPC

Fields

FieldTypeDefaultDescription
interruptTriggersList<Ref<TriggerableEntry>>empty—
npcRef<out EntityInstanceEntry>—The NPC instance to use as camera focus. Leave empty to reuse the interacting NPC from the context.
offsetXVar<Double>0.0Horizontal offset (X axis) relative to the NPC position.
offsetYVar<Double>0.0Vertical offset (Y axis) relative to the NPC position.
offsetZVar<Double>0.0Horizontal offset (Z axis) relative to the NPC position.
lookOffsetXVar<Double>0.0Horizontal offset (X axis) for the point the camera should look at.
lookOffsetYVar<Double>0.0Vertical offset (Y axis) added on top of the NPC eye height for the look at point.
lookOffsetZVar<Double>0.0Horizontal offset (Z axis) for the point the camera should look at.
pitchOffsetVar<Float>0Additional pitch offset (in degrees) applied after looking at the NPC.
relativeToNpcRotationBooleantrueRotate offsets based on the NPC yaw so X/Z offsets are relative to its facing direction.
fallbackPositionOptional<Var<Position>>—Optional fallback location when the NPC display is unavailable. Defaults to the player's current position.
Common TypeWriter fields (criteria, modifiers, triggers)
FieldTypeDefaultDescription
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—
triggersList<Ref<TriggerableEntry>>empty—

How to use it​

Use it as a bound of a dialogue or interaction. The player's camera is placed at offsetX, offsetY, offsetZ from the NPC and looks at the NPC's eyes plus lookOffsetX, lookOffsetY, lookOffsetZ. With relativeToNpcRotation on, the offsets follow the direction the NPC faces. Leave npc empty to use the NPC the player is talking to. If the NPC is not displayed, the camera uses fallbackPosition or the player's own position.