Skip to content

Collision System Collider enabled checks added.#75

Merged
SoloByte merged 5 commits intomainfrom
collision-system-collider-enabled-check
Jul 3, 2025
Merged

Collision System Collider enabled checks added.#75
SoloByte merged 5 commits intomainfrom
collision-system-collider-enabled-check

Conversation

@SoloByte
Copy link
Collaborator

@SoloByte SoloByte commented Jul 3, 2025

Refactor: CollisionHandler Query-,Cast-, and IntersectSpace functions now correctly check if collider used is enabled. Refactor: SpatialHash certain functions that work with colliders are now correctly checking if the collider is enabled.

Refactor: CollisionHandler Query-,Cast-, and IntersectSpace functions now correctly check if collider used is enabled. SpatialHash certain functions that work with colliders are now correctly checking if the collider is enabled.
@SoloByte SoloByte self-assigned this Jul 3, 2025
@SoloByte SoloByte requested a review from Copilot July 3, 2025 06:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that disabled colliders are skipped in spatial hash operations and collision handler queries.

  • Added early Enabled checks in SpatialHash methods
  • Introduced Enabled guards and updated XML docs in CollisionHandler queries

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
ShapeEngine/Geometry/CollisionSystem/SpatialHash.cs Early-return if collider.Enabled is false in registration, candidate and add methods
ShapeEngine/Geometry/CollisionSystem/CollisionHandler.cs Guards against disabled colliders in IntersectSpace, CastSpace and updated parameter docs
Comments suppressed due to low confidence (2)

ShapeEngine/Geometry/CollisionSystem/CollisionHandler.cs:650

  • [nitpick] Replace the exclamation mark with a period to maintain a formal tone in XML documentation.
    /// <param name="collider">The collider to test for intersections. The collider needs to be enabled!</param>

ShapeEngine/Geometry/CollisionSystem/CollisionHandler.cs:658

  • Add unit tests to verify that IntersectSpace returns null when collider.Enabled is false.
        if(!collider.Enabled) return null;

SoloByte and others added 4 commits July 3, 2025 08:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@SoloByte SoloByte merged commit 5518977 into main Jul 3, 2025
7 checks passed
@SoloByte SoloByte deleted the collision-system-collider-enabled-check branch July 3, 2025 06:31
@SoloByte SoloByte added this to the 5.0 milestone Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants