GridTargetingSettings
GridTargetingSettings
Configuration settings for grid targeting system Provides centralized configuration for grid positioning, targeting behavior, and visual feedback
Project: GridPlacement v6.0
Layer: Godot
Source: Godot/Core/Systems/Configuration/GridTargetingSettings.cs
Namespace: GridBuilding.Core.Systems.Configuration
Kind: class
Parsing Method: AST-based (Roslyn) - NOT regex
⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.
Properties
GridSize
Size of the grid in cells
CellSize
Size of each grid cell in world units
CellSize2D
Size of each grid cell in world units (CoreVector2 version)
Origin
Origin point of the grid in world coordinates
IsIsometric
Whether the grid uses isometric coordinates
WrapsEdges
Whether the grid wraps around edges
GridRotation
Grid rotation angle in degrees
IsEnabled
Whether the grid is enabled
IsValid
Configuration validity
MaxTargetingRange
Maximum targeting range in grid units
MinTargetingRange
Minimum targeting range in grid units
RequiresLineOfSight
Whether targeting requires line of sight
BlockingLayers
Layers that block targeting
TargetableLayers
Layers that can be targeted
AllowDiagonalMovement
Whether diagonal movement is allowed
SnapToGrid
Whether to snap to grid when targeting
SnapTolerance
Grid snapping tolerance in world units
GridLineColor
CoreColor of the grid lines
ValidTargetColor
CoreColor of valid targeting indicators
InvalidTargetColor
CoreColor of invalid targeting indicators
CursorColor
CoreColor of the targeting cursor
GridLineWidth
Width of grid lines
ShowGridLines
Whether to show grid lines
ShowCellCoordinates
Whether to show cell coordinates
CoordinateFontSize
Font size for cell coordinates
EnableAnimations
Whether to enable targeting animations
AnimationSpeed
Animation speed multiplier
CursorAnimationDuration
Cursor animation duration in seconds
TargetAnimationDuration
Target indicator animation duration in seconds
UseEasing
Whether to use easing for animations
MaxCellsPerFrame
Maximum number of cells to update per frame
UseSpatialPartitioning
Whether to use spatial partitioning for performance
PartitionCellSize
Size of spatial partition cells
EnableFrustumCulling
Whether to enable frustum culling
UpdateInterval
Update interval in seconds for performance optimization
MouseSensitivity
Mouse sensitivity for targeting
InvertMouseY
Whether to invert mouse Y axis
KeyboardSpeed
Keyboard movement speed in cells per second
EnableGamepad
Whether to enable gamepad targeting
GamepadSensitivity
Gamepad stick sensitivity
GamepadDeadZone
Dead zone for gamepad input
ShowDebugInfo
Whether to show debug information
ShowPerformanceMetrics
Whether to show performance metrics
ShowCellBoundaries
Whether to show cell boundaries
LogTargetingEvents
Whether to log targeting events
DebugFontSize
Debug overlay font size
Methods
Validate
Validates the grid targeting settings
Returns: ValidationResult
Clone
Creates a copy of these settings
Returns: GridTargetingSettings
WorldToGrid
Converts world coordinates to grid coordinates
Returns: CoreVector2I
Parameters:
CoreVector2 worldPosition
GridToWorld
Converts grid coordinates to world coordinates
Returns: CoreVector2
Parameters:
CoreVector2I gridPosition
IsValidGridPosition
Checks if a grid position is valid
Returns: bool
Parameters:
CoreVector2I gridPosition
GetNeighbors
Gets neighboring grid positions
Returns: List<CoreVector2I>
Parameters:
CoreVector2I gridPositionbool includeDiagonal
GetDistance
Gets the distance between two grid positions
Returns: float
Parameters:
CoreVector2I fromCoreVector2I tobool useManhattan
CreateDefault
Creates default settings for a standard grid
Returns: GridTargetingSettings
CreateSmallGrid
Creates settings optimized for small grids
Returns: GridTargetingSettings
CreateLargeGrid
Creates settings optimized for large grids
Returns: GridTargetingSettings
CreateIsometric
Creates settings for isometric grids
Returns: GridTargetingSettings