Rigidbody2DSynchronizableAddForce(Single, Single, ForceMode2D) Method

Adds a force to the Rigidbody.

Definition

Namespace: Alteruna.Multiplayer.Unity
Assembly: Alteruna.Multiplayer.UnityFiles (in Alteruna.Multiplayer.UnityFiles.dll) Version: 1.0.0+c5328b35489e83c42e288435f5acf6115fd519e0
C#
public void AddForce(
	float x,
	float y,
	ForceMode2D mode = ForceMode2D.Force
)

Parameters

x  Single
Size of force along the world x-axis.
y  Single
Size of force along the world y-axis.
mode  ForceMode2D  (Optional)
Type of force to apply.

See Also

Reference

[!:https://docs.unity3d.com/ScriptReference/Rigidbody2D.AddForce.html]