note_add PhysicsBody( world )


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


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 )


code GetEntity<T>() code GetEntity()


Returns the closest point to the given one between all convex shapes of this body.


Vector3 vec,

Input position.

Return Value

Vector3 output

The closest possible position on the surface of the physics body to the given position.