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:
Name | Type | Description |
---|---|---|
force | Vector3 | Force vector in world coordinates. |
position | Vector3 | Position in world coordinates. |
mode | ForceMode |
Usage
---@type Rigidbody
local rigidbody;
---@type Vector3
local force;
---@type Vector3
local position;
---@type ForceMode
local mode;
rigidbody.AddForceAtPosition(force, position, mode)