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

com.meta.spatial.physics

Package-level declarations

Types

NameSummary
class Physics(linearVelocity: Vector3 = Vector3(0.0f, 0.0f, 0.0f), angularVelocity: Vector3 = Vector3(0.0f, 0.0f, 0.0f), dimensions: Vector3 = Vector3(0.5f, 0.5f, 0.5f), shape: String = "box", densityInternal: Float = 1.0f, applyForce: Vector3 = Vector3(0.0f, 0.0f, 0.0f), restitution: Float = 0.2f, frictionInternal: Vector3 = Vector3(0.5f, 0.0f, 0.0f), state: PhysicsState = PhysicsState.DYNAMIC) : ComponentBase
class PhysicsCollisionCallbackEventArgs(val collidedEntity: Entity, val collisionPosition: Vector3, val collisionNormal: Vector3, val impulse: Float, datamodel: DataModel) : EventArgs
class PhysicsFeature(val spatial: SpatialInterface, val useGrabbablePhysics: Boolean = true, worldBounds: PhysicsWorldBounds? = null) : SpatialFeature
enum PhysicsMaterial : Enum<PhysicsMaterial>

Allows you to apply properties of certain materials to your physics objects. These are loosely researched values, and are not guaranteed to be accurate. Please use at your own risk
class PhysicsOutOfBoundsSystem(val spatial: SpatialInterface, bounds: PhysicsWorldBounds = PhysicsWorldBounds()) : SystemBase
class PhysicsWorldBounds(var minX: Float? = null, var maxX: Float? = null, var minY: Float? = null, var maxY: Float? = null, var minZ: Float? = null, var maxZ: Float? = null)
class UpdateCallbackEntitiesSystem(val mScene: Long) : SystemBase

Functions

NameSummary
Physics
fun Physics(shape: String, linearVelocity: Vector3 = Vector3(0.0f), angularVelocity: Vector3 = Vector3(0.0f), dimensions: Vector3 = Vector3(0.5f), density: Float = 1.0f, restitution: Float = 0.2f, friction: FrictionObject = FrictionObject(0.5f, 0f, 0f), state: PhysicsState = PhysicsState.DYNAMIC, applyForce: Vector3 = Vector3(0.0f)): Physics
Did you find this page helpful?
Thumbs up icon
Thumbs down icon