Skip to main content

Rigidbody.AddForce(Vector3 force, ForceMode mode = ForceMode.Force)

Adds a force to the Rigidbody.

Parameters:

NameTypeDescription
forceVector3Force vector in world coordinates.
modeForceModeType of force to apply.

Usage

---@type Rigidbody
local rigidbody;

---@type Vector3
local force;

---@type ForceMode
local mode;


rigidbody.AddForce(force, mode)