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 OnIntersectionEnddata_object OnIntersectionStartdata_object OnIntersectionUpdatedata_object Parentdata_object PhysicsGroupdata_object Positiondata_object Rotationdata_object Scaledata_object SelfOrParentdata_object Shapesdata_object Sleepingdata_object SpeculativeContactEnableddata_object Surfacedata_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 AddShape( part, transform, rebuildMass ) code AddShape( part, transform, convertToHull, rebuildMass ) 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 Move( tx, delta ) code RebuildMass() code Remove() code SetMinSolverIterations( minVelocityIterations, minPositionIterations ) code WorldPoint( p )

Extensions

code GetEntity<T>() code GetEntity()
AddBoxShape
PhysicsShape AddBoxShape( Vector3 position, Rotation rotation, Vector3 extent, bool rebuildMass = true, )

Summary

Add a box shape to this body.

Parameters

Vector3 position,

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

Rotation rotation,

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

Vector3 extent,

The extents of the box. The box will extend from its center by this much in both negative and positive directions of each axis.

bool rebuildMass = true,

Whether the mass should be recalculated after adding the shape.

Return Value

The newly created shape, or null on failure.