Class TargetingSnapshot2D
- Namespace
- MoonBark.GridPlacement.Core.Types
- Assembly
- MoonBark.GridPlacement.Core.dll
Represents a snapshot of targeting information for placement operations.
This class contains all the data needed to determine where a placeable object should be positioned and how it should be oriented.
public class TargetingSnapshot2D
- Inheritance
-
TargetingSnapshot2D
- Inherited Members
Constructors
TargetingSnapshot2D()
Creates a new targeting snapshot with default values.
public TargetingSnapshot2D()
TargetingSnapshot2D(CoreVector2I)
Creates a new targeting snapshot with the specified grid position.
public TargetingSnapshot2D(CoreVector2I gridPosition)
Parameters
gridPositionCoreVector2IThe grid position.
Properties
CellCenter
Gets or sets the world position (center of the grid cell).
public CoreVector2 CellCenter { get; set; }
Property Value
- CoreVector2
Data
Gets or sets additional targeting data.
public Dictionary<string, object> Data { get; set; }
Property Value
GridPosition
Gets or sets the grid position where the targeting cursor is located.
public CoreVector2I GridPosition { get; set; }
Property Value
- CoreVector2I
IsValid
Gets or sets whether the targeting position is valid.
public bool IsValid { get; set; }
Property Value
Mode
Gets or sets the targeting mode being used.
public TargetingMode Mode { get; set; }
Property Value
Normal
Gets or sets the normal vector at the targeting position.
public CoreVector2 Normal { get; set; }
Property Value
- CoreVector2
WorldPosition
Gets or sets the world position of the targeting cursor.
public CoreVector2 WorldPosition { get; set; }
Property Value
- CoreVector2
Methods
Clone()
Creates a copy of this targeting snapshot.
public TargetingSnapshot2D Clone()
Returns
- TargetingSnapshot2D
A new TargetingSnapshot2D with the same values.