An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.4 KiB

Rigidbody2D Commands

Commands that interact with UnityEngine.Rigidbody2D & Fungus.Rigidbody2DVariable

[TOC]

AddTorque2D

Add Torque to a Rigidbody2D.

Defined in Fungus.AddTorque2D

Property Type Description
rb Fungus.Rigidbody2DData Targeted rigidbody2d
forceMode Unity.ForceMode2D Parameter given to AddTorque
force Fungus.FloatData Amount of torque to be added

AddForce2D

Add Force to a Rigidbody2D.

Defined in Fungus.AddForce2D

Property Type Description
rb Fungus.Rigidbody2DData Targeted rigidbody2d
forceMode Unity.ForceMode2D Parameter given to AddForce
forceFunction System.Enum Which variant of AddForce to use (AddForce,AddForceAtPosition,AddRelativeForce)
force Fungus.Vector2DData Amount of torque to be added
forceScaleFactor Fungus.FloatData Scale factor to be applied to force as it is used. Default 1.
atPosition Fungus.Vector2DData World position the force is being applied from. Used only in AddForceAtPosition

StopMotion2D

Stop motion or angularmotion or both of a rigidbody2d.

Defined in Fungus.StopMotion2D

Property Type Description
rb Fungus.Rigidbody2DData Targeted rigidbody2d
motionToStop System.Enum Which motion to stop (Velocity,AngularVelocity,AngularAndLinearVelocity)