Skip to content

Class

PlacementCachedShapeCast2D

Generated GDScript class reference for GridPlacement.PlacementCachedShapeCast2D.

Status
Current
Version
v6.3.0
Source updated
2026-10-29
Generated on
2026-10-29

6.3. These pages document the 6.3 release, where placeable is now entry (what changed) and PlacementOwner is deprecated (migration). Still on 6.2? Your version's guides ship inside the plugin itself, under addons/grid_placement/guides/; the 6.2 URLs on this site now redirect to this series.

Base ShapeCast2D providing thread-safe, immediate collision caching. Under threaded physics (physics/2d/run_on_separate_thread=true), calling Godot's built-in collision methods outside _physics_process can cause thread safety issues or return stale data. This base class manages a thread-safe cache populated safely during the physics process frame.

Source: addons/grid_placement/base/placement_cached_shape_cast_2d.gd

Syntax

class PlacementCachedShapeCast2D extends ShapeCast2D

Members

NameKindSummary
resolve_placement_dependenciesMethod
resolve_placement_runtimeMethod
cached_is_collidingProperty
cached_collidersProperty
cached_colliders_snapshotPropertyRead-only view of the last cached colliders. Unlike cached_colliders this never refreshes the cache, so a reader that reports the cache cannot change it: telemetry and failure evidence describe the hover the player saw, not the one a fresh cast would find now.
cached_global_transformPropertyTracks the global transform at which the collision cache was last updated.
is_in_physics_processMethod
force_shapecast_updateMethod
get_cache_age_framesMethod
is_cache_staleMethod
is_cache_populatedMethod