Skip to main content

ColliderHelper

class ThaumielMapEditor.API.Helpers

Overview​

Fields​

NameTypeDescription
SchematicCollidersDictionary<SchematicData, HashSet<Collider>>No description

Methods​

SignatureReturnsDescription
CreateClientObjectColliders(ClientSideObjectBase, SchematicData)voidCreates the colliders on the server for the client side objects.
CreateCollisionMesh(PrimitiveObject)voidCreates the colliders for primitives
DisableColliders(ClientSideObjectBase)voidDisables all the colliders on the specified `ThaumielMapEditor.API.Blocks.Client…
EnableColliders(ClientSideObjectBase)voidEnables all the colliders on the specified `ThaumielMapEditor.API.Blocks.ClientS…
SetColliders(ClientSideObjectBase, bool)voidIf enabled is true colliders will be enabled else if enabled is false co…

Fields​

SchematicColliders​

Type: Dictionary<SchematicData, HashSet<Collider>>


Methods​

CreateClientObjectColliders​

CreateClientObjectColliders
public void CreateClientObjectColliders(
ClientSideObjectBase clientObject,
SchematicData schematic
)

Creates the colliders on the server for the client side objects.

Parameters​

NameTypeDescription
clientObjectClientSideObjectBaseThe ThaumielMapEditor.API.Blocks.ClientSide.ClientSideObjectBase to create colliders for.
schematicSchematicDataThe ThaumielMapEditor.API.Data.SchematicData that the colliders will be parented to.

CreateCollisionMesh​

CreateCollisionMesh
public void CreateCollisionMesh(PrimitiveObject primitive)

Creates the colliders for primitives

Parameters​

NameTypeDescription
primitivePrimitiveObject

DisableColliders​

DisableColliders
public void DisableColliders(ClientSideObjectBase clientObject)

Disables all the colliders on the specified ThaumielMapEditor.API.Blocks.ClientSide.ClientSideObjectBase.

Parameters​

NameTypeDescription
clientObjectClientSideObjectBaseThe client side object to disable the server side colliders on.

EnableColliders​

EnableColliders
public void EnableColliders(ClientSideObjectBase clientObject)

Enables all the colliders on the specified ThaumielMapEditor.API.Blocks.ClientSide.ClientSideObjectBase.

Parameters​

NameTypeDescription
clientObjectClientSideObjectBaseThe client side object to enable the server side colliders on.

SetColliders​

SetColliders
public void SetColliders(
ClientSideObjectBase clientObject,
bool enabled
)

If enabled is true colliders will be enabled else if enabled is false colliders will be disabled.

Parameters​

NameTypeDescription
clientObjectClientSideObjectBase
enabledbool