Class InteractionInfo
Information about an interaction, calculated on the client.
Inheritance
System.Object
InteractionInfo
Assembly: Eco.Shared.dll
Syntax
[BsonAutoSerialize]
public class InteractionInfo : Object, IBsonSerialize, IBsonSerializable, IBsonDeserializable
Constructors
InteractionInfo()
Declaration
Properties
BlockPosition
The targeted block, if set. Will not be set at the same time as TargetObject.
Declaration
public Nullable<Vector3i> BlockPosition { get; set; }
Property Value
Type |
Description |
System.Nullable<Vector3i> |
|
Distance
Distance to the interaction target.
Declaration
public float Distance { get; set; }
Property Value
Type |
Description |
System.Single |
|
FacingDirection
The facing direction of the player when performing the action.
Declaration
public DirectionAxisHorizontal FacingDirection { get; set; }
Property Value
ID
ID used to rewind bad predictions.
Declaration
public int ID { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
IsAirInteraction
Interact without a target is considered air interaction aka dropping block off a cliff. When true, Block Position is the position down the cliff.
Declaration
public bool IsAirInteraction { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Method
Method used to start the interaction.
Declaration
public InteractionMethod Method { get; set; }
Property Value
Modifier
Any modifier key held down while triggering the interaction.
Declaration
public InteractionModifier Modifier { get; set; }
Property Value
Normal
The facing direction of the side of the selected block. This is the side any placed block will be.
Declaration
public Nullable<Vector3i> Normal { get; set; }
Property Value
Type |
Description |
System.Nullable<Vector3i> |
|
Parameters
Custom interaction parameters.
Declaration
public BSONObject Parameters { get; set; }
Property Value
Position
When TargetObject is not null, the position the interaction ray intersected with the target object.
Declaration
public Nullable<Vector3> Position { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Numerics.Vector3> |
|
TargetObject
The object being interacted with, if set. If this is set BlockPosition will be null.
Declaration
public INetObject TargetObject { get; set; }
Property Value
Methods
FromBson(BSONArray)
Declaration
public void FromBson(BSONArray bson)
Parameters
ToBson()
Declaration
public BSONArray ToBson()
Returns
Implements
Extension Methods