RigidBodyComponent

Sansar.Simulation.RigidBodyComponent

RigidBodyComponent Class

The RigidBodyComponent handles interactions with rigid body physics.

Syntax

[Sansar.Script.Interface]
public class RigidBodyComponent : Sansar.Script.InstanceInterface

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Fields

static readonly
ComponentType ComponentType . The RigidBodyComponent.ComponentType of this component

Public Properties

[read-only]
 
ComponentId Sansar.Script.ComponentId . Retrieves the component id for this RigidBodyComponent.
[read-only]
 
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)

Public Methods

  AddAngularImpulse (Sansar.Vector) : ulong
Adds an angular impulse to this RigidBodyComponent.
  AddAngularImpulse (Sansar.Vector, Sansar.Script.ScriptBase.OperationComplete) : ulong
Adds an angular impulse to this RigidBodyComponent.
  AddAngularImpulse (Sansar.Vector, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Adds an angular impulse to this RigidBodyComponent.
  AddLinearImpulse (Sansar.Vector) : ulong
Adds a linear impulse the the center of mass of this RigidBodyComponent.
  AddLinearImpulse (Sansar.Vector, Sansar.Script.ScriptBase.OperationComplete) : ulong
Adds a linear impulse the the center of mass of this RigidBodyComponent.
  AddLinearImpulse (Sansar.Vector, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Adds a linear impulse the the center of mass of this RigidBodyComponent.
  GetAngularVelocity () : Sansar.Vector
Retrieves the angular velocity for this RigidBodyComponent.
  GetLinearVelocity () : Sansar.Vector
Retrieves the linear velocity for this RigidBodyComponent.
  GetMass () : float
Retrieves the mass of this RigidBodyComponent.
  GetOrientation () : Sansar.Quaternion
Retrieves the orientation of this RigidBodyComponent.
  GetPosition () : Sansar.Vector
Retrieves the position of this RigidBodyComponent.
  IsTriggerVolume () : bool
Whether this RigidBodyComponent is a TriggerVolume.
  SetAngularVelocity (Sansar.Vector) : ulong
Sets the angular velocity for this RigidBodyComponent.
  SetAngularVelocity (Sansar.Vector, Sansar.Script.ScriptBase.OperationComplete) : ulong
Sets the angular velocity for this RigidBodyComponent.
  SetAngularVelocity (Sansar.Vector, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Sets the angular velocity for this RigidBodyComponent.
  SetLinearVelocity (Sansar.Vector) : ulong
Sets the linear velocity for this RigidBodyComponent.
  SetLinearVelocity (Sansar.Vector, Sansar.Script.ScriptBase.OperationComplete) : ulong
Sets the linear velocity for this RigidBodyComponent.
  SetLinearVelocity (Sansar.Vector, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Sets the linear velocity for this RigidBodyComponent.
  SetMass (float) : ulong
Sets the mass of this RigidBodyComponent.
  SetMass (float, Sansar.Script.ScriptBase.OperationComplete) : ulong
Sets the mass of this RigidBodyComponent.
  SetMass (float, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Sets the mass of this RigidBodyComponent.
  SetOrientation (Sansar.Quaternion) : ulong
Sets the orientation of this RigidBodyComponent.
  SetOrientation (Sansar.Vector) : ulong
Sets the orientation of this RigidBodyComponent.
  SetOrientation (Sansar.Quaternion, Sansar.Script.ScriptBase.OperationComplete) : ulong
Sets the orientation of this RigidBodyComponent.
  SetOrientation (Sansar.Quaternion, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Sets the orientation of this RigidBodyComponent.
  SetOrientation (Sansar.Vector, Sansar.Script.ScriptBase.OperationComplete) : ulong
Sets the orientation of this RigidBodyComponent.
  SetOrientation (Sansar.Vector, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Sets the orientation of this RigidBodyComponent.
  SetPosition (Sansar.Vector) : ulong
Sets the position of this RigidBodyComponent.
  SetPosition (Sansar.Vector, Sansar.Script.ScriptBase.OperationComplete) : ulong
Sets the position of this RigidBodyComponent.
  SetPosition (Sansar.Vector, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Sets the position of this RigidBodyComponent.
  Subscribe (CollisionEventType, RigidBodyComponent.SubscriptionHandler, bool)
Subscribes to Collision Events.
  Subscribe (CollisionEventType, Sansar.Script.ComponentId, RigidBodyComponent.SubscriptionHandler, bool)
Subscribes to Collision Events.
  Subscribe (CollisionEventType, Sansar.Script.ComponentId, Action<CollisionData>, bool)
Subscribes to Collision Events.
  SubscribeToEvent (CollisionEventType)
Subscribes to rigid body events.
override
ToString () : string
A string representation of this object.
  UnsubscribeFromEvent (CollisionEventType)
Unsubscribes from rigid body events.

Member Details

AddAngularImpulse Method

Adds an angular impulse to this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong AddAngularImpulse (Sansar.Vector impulse)

Parameters

impulse
The impulse.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

AddAngularImpulse Method

Adds an angular impulse to this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong AddAngularImpulse (Sansar.Vector impulse, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

impulse
The impulse.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

AddAngularImpulse Method

Adds an angular impulse to this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong AddAngularImpulse (Sansar.Vector impulse, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

impulse
The impulse.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

AddLinearImpulse Method

Adds a linear impulse the the center of mass of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong AddLinearImpulse (Sansar.Vector impulse)

Parameters

impulse
The impulse.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

AddLinearImpulse Method

Adds a linear impulse the the center of mass of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong AddLinearImpulse (Sansar.Vector impulse, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

impulse
The impulse.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

AddLinearImpulse Method

Adds a linear impulse the the center of mass of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong AddLinearImpulse (Sansar.Vector impulse, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

impulse
The impulse.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ComponentId Property

Retrieves the component id for this RigidBodyComponent.

Syntax

[get: Sansar.Script.Interface]
public Sansar.Script.ComponentId ComponentId { get; }

Value

The id.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ComponentType Field

The RigidBodyComponent.ComponentType of this component

Syntax

public static readonly ComponentType ComponentType

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetAngularVelocity Method

Retrieves the angular velocity for this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public Sansar.Vector GetAngularVelocity ()

Returns

The velocity.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetLinearVelocity Method

Retrieves the linear velocity for this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public Sansar.Vector GetLinearVelocity ()

Returns

The velocity.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetMass Method

Retrieves the mass of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public float GetMass ()

Returns

The mass.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetOrientation Method

Retrieves the orientation of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public Sansar.Quaternion GetOrientation ()

Returns

The orientation.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetPosition Method

Retrieves the position of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public Sansar.Vector GetPosition ()

Returns

The position.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

IsTriggerVolume Method

Whether this RigidBodyComponent is a TriggerVolume.

Syntax

[Sansar.Script.Interface]
public bool IsTriggerVolume ()

Returns

The true if this RigidBodyComponent is a TriggerVolume.

Remarks

TriggerVolumes can be moved through and generate CollisionEventType.cTrigger collision events instead of normal collision events.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetAngularVelocity Method

Sets the angular velocity for this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetAngularVelocity (Sansar.Vector velocity)

Parameters

velocity
The velocity.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. Subsequent calls to RigidBodyComponent.GetAngularVelocity will return the previous velocity until the write occurs. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetAngularVelocity Method

Sets the angular velocity for this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetAngularVelocity (Sansar.Vector velocity, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

velocity
The velocity.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. Subsequent calls to RigidBodyComponent.GetAngularVelocity will return the previous velocity until the write occurs. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetAngularVelocity Method

Sets the angular velocity for this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetAngularVelocity (Sansar.Vector velocity, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

velocity
The velocity.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. Subsequent calls to RigidBodyComponent.GetAngularVelocity will return the previous velocity until the write occurs. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetLinearVelocity Method

Sets the linear velocity for this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetLinearVelocity (Sansar.Vector velocity)

Parameters

velocity
The velocity.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. Subsequent calls to RigidBodyComponent.GetLinearVelocity will return the previous velocity until the write occurs. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetLinearVelocity Method

Sets the linear velocity for this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetLinearVelocity (Sansar.Vector velocity, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

velocity
The velocity.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. Subsequent calls to RigidBodyComponent.GetLinearVelocity will return the previous velocity until the write occurs. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetLinearVelocity Method

Sets the linear velocity for this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetLinearVelocity (Sansar.Vector velocity, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

velocity
The velocity.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. Subsequent calls to RigidBodyComponent.GetLinearVelocity will return the previous velocity until the write occurs. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetMass Method

Sets the mass of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetMass (float mass)

Parameters

mass
The mass.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetMass Method

Sets the mass of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetMass (float mass, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

mass
The mass.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetMass Method

Sets the mass of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetMass (float mass, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

mass
The mass.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetOrientation Method

Sets the orientation of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetOrientation (Sansar.Quaternion orientation)

Parameters

orientation
The orientation.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetOrientation Method

Sets the orientation of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetOrientation (Sansar.Vector orientation)

Parameters

orientation
The orientation.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetOrientation Method

Sets the orientation of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetOrientation (Sansar.Quaternion orientation, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

orientation
The orientation.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetOrientation Method

Sets the orientation of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetOrientation (Sansar.Quaternion orientation, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

orientation
The orientation.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetOrientation Method

Sets the orientation of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetOrientation (Sansar.Vector orientation, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

orientation
The orientation.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetOrientation Method

Sets the orientation of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetOrientation (Sansar.Vector orientation, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

orientation
The orientation.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetPosition Method

Sets the position of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetPosition (Sansar.Vector position)

Parameters

position
The position.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetPosition Method

Sets the position of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetPosition (Sansar.Vector position, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

position
The position.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetPosition Method

Sets the position of this RigidBodyComponent.

Syntax

[Sansar.Script.Interface]
public ulong SetPosition (Sansar.Vector position, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

position
The position.
handler
Handler to be called when the event completes.

Returns

The return value is an internal event id.

Remarks

This asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Subscribe Method

Subscribes to Collision Events.

Syntax

[Sansar.Script.Interface]
public void Subscribe (CollisionEventType EventType, RigidBodyComponent.SubscriptionHandler callback, bool persistent)

Parameters

EventType
The type of collision which occurred.
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Subscribe Method

Subscribes to Collision Events.

Syntax

[Sansar.Script.Interface]
public void Subscribe (CollisionEventType EventType, Sansar.Script.ComponentId HitComponentId, RigidBodyComponent.SubscriptionHandler callback, bool persistent)

Parameters

EventType
The type of collision which occurred.
HitComponentId
The id of the rigid body component or character that was hit.
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Subscribe Method

Subscribes to Collision Events.

Syntax

[Sansar.Script.Interface]
public void Subscribe (CollisionEventType EventType, Sansar.Script.ComponentId HitComponentId, Action<CollisionData> callback, bool persistent)

Parameters

EventType
The type of collision which occurred.
HitComponentId
The id of the rigid body component or character that was hit.
callback
Callback which is executed when the event completes.
persistent
Optional, set to false to unsubscribe after one event.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SubscribeToEvent Method

Subscribes to rigid body events.

Syntax

[Sansar.Script.Interface]
public void SubscribeToEvent (CollisionEventType events)

Parameters

events
Any combination of Sansar.Simulation.CollisionEventType flags.

Remarks

This method is usually not required to be called manually.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface]
public override string ToString ()

Returns

A string representation of this object.

Remarks

The format of this string may change between releases.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

UnsubscribeFromEvent Method

Unsubscribes from rigid body events.

Syntax

[Sansar.Script.Interface]
public void UnsubscribeFromEvent (CollisionEventType events)

Parameters

events
Any combination of Sansar.Simulation.CollisionEventType flags.

Remarks

This method is usually not required to be called manually.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0


Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.