Skip to main content

Rigidbody.AddForceAtPosition(Vector3 force, Vector3 position, ForceMode mode = ForceMode.Force)

Applies force at position. As a result this will apply a torque and force on the object.

Parameters:

NameTypeDescription
forceVector3Force vector in world coordinates.
positionVector3Position in world coordinates.
modeForceMode

Usage

---@type Rigidbody
local rigidbody;

---@type Vector3
local force;

---@type Vector3
local position;

---@type ForceMode
local mode;


rigidbody.AddForceAtPosition(force, position, mode)