ObjectPhysics
ThaumielMapEditor.API.Components.Tools
Overview​
Properties​
| Name | Type | Access | Description |
|---|---|---|---|
AngularDrag | float | get set | Gets or sets the rotation resistance for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody. |
CollisionMode | CollisionDetectionMode | get set | Gets or sets the UnityEngine.CollisionDetectionMode for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody. |
Drag | float | get set | Gets or sets the drag for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody. |
Enabled | bool | get set | Gets or sets whether the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody applies physics or not |
Rigidbody | Rigidbody | 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 | ToolType | get | The ThaumielMapEditor.API.Enums.ToolType this ThaumielMapEditor.API.Components.Tools.ToolBase instance uses. |
Weight | float | get set | Gets or sets the mass for the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody. |
Methods​
| Signature | Returns | Description |
|---|---|---|
AddForce(Vector3, ForceMode) | void | Adds the specified force to the `ThaumielMapEditor.API.Components.Tools.ObjectPh… |
Init(ServerObject, SchematicData, Dictionary<string, object>) | void | Initializes 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​
public void AddForce(
Vector3 force,
ForceMode mode
)
Adds the specified force to the ThaumielMapEditor.API.Components.Tools.ObjectPhysics.Rigidbody
Parameters​
| Name | Type | Description |
|---|---|---|
force | Vector3 | The amount of UnityEngine.Vector3 force to add. |
mode | ForceMode | The UnityEngine.ForceMode that will be used. |
Init​
public void Init(
ServerObject obj,
SchematicData schem,
Dictionary<string, object> properties
)
Initializes the component.
Parameters​
| Name | Type | Description |
|---|---|---|
obj | ServerObject | |
schem | SchematicData | |
properties | Dictionary<string, object> |