API reference
API reference
Select your platform
No SDKs available
No versions available

GrabbableSystem

GrabbableSystem

class GrabbableSystem : SystemBase
GrabbableSystem is a System that allows for grabbing of objects in the scene. It is responsible for detecting when an object is grabbed and then updating the object’s position and rotation to match the grabber’s position and rotation. It also handles the release of the object when the grabber releases it.
This System comes default with Meta Spatial SDK and operates on entities with Grabbable components. It interacts with Controller components to detect grab inputs and can affect Followable components by disabling them during grabs.

Constructors

NameSummary
GrabbableSystem
constructor()

Properties

NameSummary
active
var active: Boolean
grabButtons
var grabButtons: Int

The default is just grabbing with the grip buttons. You can change the grab buttons by accessing the grabButtons variable of the GrabbableSystem:
systemManager
lateinit var systemManager: SystemManager

The system manager that this system is associated with.

Functions

NameSummary
associateSystemManager
fun associateSystemManager(systemManager: SystemManager)

Associates this system with a system manager, used in the Spatial SDK.
delete
open override fun delete(entity: Entity)

System should do any housekeeping based on entity being removed from the scene
destroy
open fun destroy()

System should clean up any and all resources for shutdown
equals
open operator override fun equals(other: Any?): Boolean

Checks if this system is equal to another object.
execute
open override fun execute()

System should perform all the operations based on relevant entities.
getDependencies
open fun getDependencies(): SystemDependencies?

Returns the dependencies of this system.
getScene
fun getScene(): Scene

Returns the scene that this system is associated with.
hashCode
open override fun hashCode(): Int

Returns the hash code of this system.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon