PlayerCharacterController is a module script that manages player character interactions in Highrise Studio. It handles tap-to-move, tap events, long press interactions, emotes, and anchor occupancy. This is a module script that can be required in your Lua code.
Properties
Options for the player character controller including enabled state, tap to move, tap handlers, long press settings, and character long press configuration. The fields are:
- enabled (boolean): Whether the player character controller is enabled
- tapToMoveEnabled (boolean): Whether tap to move is enabled
- tapHandlersEnabled (boolean): Whether tap handlers are enabled
- emotesEnabled (boolean): Whether emotes are enabled
- enableLongPress (boolean): Whether long press is enabled
- characterLongPress (table with height (float), bounceDuration (float)): The long press configuration
local PlayerCharacterController = require("PlayerCharacterController")
PlayerCharacterController.options.enabled = true
PlayerCharacterController.options.tapToMoveEnabled = true
PlayerCharacterController.options.emotesEnabled = false
PlayerCharacterController.options.characterLongPress.height = 0.5
Methods
Handles tap events on colliders at the specified hit point.
local PlayerCharacterController = require("PlayerCharacterController")
PlayerCharacterController.HandleTapOn(collider, hitPoint)
Returns true if the given anchor is occupied.
local PlayerCharacterController = require("PlayerCharacterController")
if PlayerCharacterController.IsAnchorOccupied(anchor) then
print("Anchor is occupied")
end
Parameters
anchor
Returns
boolean
Updated 13 days ago