classPhysicsBody

Constructors

note_add PhysicsBody( world )

Properties

data_object AngularDampingdata_object AngularDragdata_object AngularVelocitydata_object AutoSleepdata_object BodyTypedata_object Densitydata_object DragEnableddata_object Enableddata_object EnableSolidCollisionsdata_object EnableTouchdata_object EnableTouchPersistsdata_object EnableTraceAndQueriesdata_object GameObjectdata_object GravityEnableddata_object GravityScaledata_object GroupIndexdata_object GroupNamedata_object Inertiadata_object InertiaRotationdata_object LastWaterEffectdata_object LinearDampingdata_object LinearDragdata_object LocalMassCenterdata_object Massdata_object MassCenterdata_object MotionEnableddata_object Parentdata_object PhysicsGroupdata_object Positiondata_object Rotationdata_object Scaledata_object SelfOrParentdata_object Shapesdata_object Sleepingdata_object SpeculativeContactEnableddata_object SurfaceMaterialdata_object Transformdata_object UseControllerdata_object Velocitydata_object World

Methods

code AddBoxShape( position, rotation, extent, rebuildMass ) code AddCapsuleShape( center, center2, radius, rebuildMass ) code AddCloneShape( shape ) code AddHullShape( position, rotation, points, rebuildMass ) code AddHullShape( position, rotation, points, rebuildMass ) code AddMeshShape( vertices, indices ) code AddMeshShape( vertices, indices ) code AddSphereShape( center, radius, rebuildMass ) code ApplyAngularImpulse( impulse ) code ApplyForce( force ) code ApplyForceAt( position, force ) code ApplyImpulse( impulse ) code ApplyImpulseAt( position, velocity ) code ApplyTorque( force ) code CheckOverlap( body ) code CheckOverlap( body, transform ) code ClearForces() code ClearShapes() code ClearTorque() code FindClosestPoint( vec ) code GetBounds() code GetVelocityAtPoint( point ) code LocalPoint( p ) code MassCenterPoint() code RebuildMass() code Remove() code SetMinSolverIterations( minVelocityIterations, minPositionIterations ) code WorldPoint( p )

Extensions

code GetEntity<T>() code GetEntity()
AddHullShape
PhysicsShape AddHullShape( Vector3 position, Rotation rotation, Span<Vector3> points, bool rebuildMass = true, )

Summary

Add a convex hull shape to this body.

Parameters

Vector3 position,

Center of the hull, relative to PhysicsBody.Position of this body.

Rotation rotation,

Rotation of the hull, relative to PhysicsBody.Rotation of this body.

Span<Vector3> points,

Points for the hull. They will be used to generate a convex shape.

bool rebuildMass = true,

Whether the mass should be recalculated after adding the shape.

Return Value

The newly created shape, or null on failure.