HPL3/SOMA/Areas/Sit Area

From Frictional Wiki
< HPL3‎ | SOMA‎ | Areas
Jump to navigation Jump to search

A Sit Area is an interactable SOMA area that moves the player's camera to the area's position and orientation, then limits how far the player can look while seated. It uses SOMA's dedicated State_Sit player state.

Create and place a Sit Area

  1. In the Level Editor, select Area EditMode and choose the Sit area type.
  2. Place the area where the player's camera should end up while seated.
  3. Rotate its orientation indicator toward the desired forward direction. The Sit state reads the area's complete transform as the target camera transform.
  4. Set MaxYaw and MaxPitch to limit the seated view.
  5. Give the area a clear unique name, save the map, and test it in development mode.

The class definition enables the orientation indicator and disables ordinary scaling in the editor. Placement and rotation are therefore the important setup operations. Keep the target camera position clear of nearby geometry.

Properties

Property Type Default Purpose
MaxYaw Float 80 Maximum horizontal view offset from the area's forward direction. The area script converts this editor value from degrees to radians before entering the Sit state.
MaxPitch Float 50 Maximum vertical view offset from the area's forward direction. The area script also converts this value from degrees to radians.

Runtime behavior

When the player focuses the area, SOMA displays the sit-down interaction icon. Interacting performs the following sequence:

  1. The area disables itself so it cannot be selected again during the transition.
  2. Its yaw limit, pitch limit, and name are passed to State_Sit.
  3. The player changes to the Sit state.
  4. Over 1.5 seconds, the camera interpolates from its original transform to the Sit Area's transform.
  5. Once seated, normal movement input is suppressed and look input is clamped to the configured yaw and pitch limits.

The player can leave the state with interaction cancel, forward movement, or jump. On a normal exit, the camera returns to ordinary control and the Sit Area is reactivated. While seated, the player can still interact with a focused prop; SOMA preserves the special read crosshair for readable props and otherwise shows the default crosshair.

Shipped SOMA reference

SOMA contains one serialized Sit Area, SitArea_5, in maps/chapter00/00_03_laboratory/00_03_laboratory.hpm_Area. It uses the default values MaxYaw=80 and MaxPitch=50, and its rotation faces in the opposite horizontal direction from the default orientation.

That shipped instance is saved with Active="false". It confirms the serialized type, transform, and properties, but it is not an active campaign demonstration of the complete interaction.

Test the area

  1. Approach the area and confirm that the sit-down icon appears.
  2. Interact and confirm that the camera moves to the intended position without clipping into the seat or nearby geometry.
  3. Look in every direction and verify that the limits fit the scene.
  4. Press interaction cancel, forward, or jump and confirm that ordinary camera and movement control return.
  5. Interact again to confirm that the area was reactivated.

Still to verify

SOMA has no active shipped Sit Area to use as a visual reference. Exact placement relative to different chair meshes, collision-clearance requirements, and behavior after save/load should be verified in a test map.

See also