Skip to main content

ObjectPhysics

class ThaumielMapEditor.API.Components.Tools

Overview​

Properties​

NameTypeAccessDescription
AngularDragfloatget setGets or sets the rotation resistance for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody.
CollisionModeCollisionDetectionModeget setGets or sets the UnityEngine.CollisionDetectionMode for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody.
Dragfloatget setGets or sets the drag for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody.
Enabledboolget setGets or sets whether the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody applies physics or not
RigidbodyRigidbodygetGets the UnityEngine.Rigidbody for this ThaumielMapEditor.API.Components.Tools.ObjectPhysics instance. Null until ThaumielMapEditor.API.Components.Tools.ObjectPhysics.SetupRigidbody is called by ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Init(ThaumielMapEditor.API.Blocks.ServerObject,ThaumielMapEditor.API.Data.SchematicData,System.Collections.Generic.Dictionary{System.String,System.Object}).
TypeToolTypegetThe ThaumielMapEditor.API.Enums.ToolType this ThaumielMapEditor.API.Components.Tools.ToolBase instance uses.
Weightfloatget setGets or sets the mass for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody.

Methods​

SignatureReturnsDescription
AddForce(Vector3, ForceMode)voidAdds the specified force to the `ThaumielMapEditor.API.Components.Tools.ObjectPh…
Init(ServerObject, SchematicData, Dictionary<string, object>)voidInitializes the component.

Properties​

AngularDrag​

Type: float Access: get set

Gets or sets the rotation resistance for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody.


CollisionMode​

Type: CollisionDetectionMode Access: get set

Gets or sets the UnityEngine.CollisionDetectionMode for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody.


Drag​

Type: float Access: get set

Gets or sets the drag for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody.


Enabled​

Type: bool Access: get set

Gets or sets whether the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody applies physics or not


Rigidbody​

Type: Rigidbody Access: get

Gets the UnityEngine.Rigidbody for this ThaumielMapEditor.API.Components.Tools.ObjectPhysics instance. Null until ThaumielMapEditor.API.Components.Tools.ObjectPhysics.SetupRigidbody is called by ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Init(ThaumielMapEditor.API.Blocks.ServerObject,ThaumielMapEditor.API.Data.SchematicData,System.Collections.Generic.Dictionary{System.String,System.Object}).


Type​

Type: ToolType Access: get

The ThaumielMapEditor.API.Enums.ToolType this ThaumielMapEditor.API.Components.Tools.ToolBase instance uses.


Weight​

Type: float Access: get set

Gets or sets the mass for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody.


Methods​

AddForce​

AddForce
public void AddForce(
Vector3 force,
ForceMode mode
)

Adds the specified force to the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody

Parameters​

NameTypeDescription
forceVector3The amount of UnityEngine.Vector3 force to add.
modeForceModeThe UnityEngine.ForceMode that will be used.

Init​

Init
public void Init(
ServerObject obj,
SchematicData schem,
Dictionary<string, object> properties
)

Initializes the component.

Parameters​

NameTypeDescription
objServerObject
schemSchematicData
propertiesDictionary<string, object>