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 ShapeCast2DMembers
| Name | Kind | Summary |
|---|---|---|
resolve_placement_dependencies | Method | |
resolve_placement_runtime | Method | |
cached_is_colliding | Property | |
cached_colliders | Property | |
cached_global_transform | Property | Tracks the global transform at which the collision cache was last updated. |
is_in_physics_process | Method | |
force_shapecast_update | Method | |
get_cache_age_frames | Method | |
is_cache_stale | Method |