Skip to content

Simplify using physics#1570

Merged
fallenatlas merged 12 commits intomainfrom
1246-add-triggerarea
Nov 21, 2025
Merged

Simplify using physics#1570
fallenatlas merged 12 commits intomainfrom
1246-add-triggerarea

Conversation

@fallenatlas
Copy link
Copy Markdown
Contributor

@fallenatlas fallenatlas commented Aug 20, 2025

Description

Create Collider component

  • Supports area behavior and start and end intersection events
  • Holds if a body is active and if is static (for optimizations)
  • Replaces the necessity for collision groups since a collider is always the owner of a collision shape

Create ColliderBundle: facilitates creation of entities that have collider behavior (intersections)

  • Supports area behavior and start and end intersection events
  • Adds layers and masks

Add RigidBodyBundle
Add StaticBodyBundle

Make AccumulatedCorrection private

Checklist

  • Self-review changes.
  • Evaluate impact on the documentation.
  • Write new samples (collision_areas sample)
  • Add entry to the changelog's unreleased section.

@fallenatlas fallenatlas self-assigned this Aug 20, 2025
@fallenatlas fallenatlas linked an issue Aug 20, 2025 that may be closed by this pull request
2 tasks
@fallenatlas fallenatlas force-pushed the 1246-add-triggerarea branch from 92bd7e9 to 760307b Compare August 20, 2025 23:13
@github-actions github-actions Bot added A-Engine B-Collisions P-Urgent This issue is a big priority, and it would be good to close it ASAP S-Needs-Design Demands some time designing an implementation labels Aug 20, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 20, 2025

PR Preview Action v1.6.3

🚀 View preview at
https://GameDevTecnico.github.io/cubos/preview/pr-1570/

Built to branch gh-pages at 2025-11-21 14:59 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 26.11111% with 133 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.03%. Comparing base (3fb5778) to head (c8a63cd).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
engine/src/collisions/narrow_phase/plugin.cpp 14.10% 67 Missing ⚠️
engine/src/physics/plugin.cpp 0.00% 28 Missing ⚠️
...ngine/src/physics/components/rigid_body_bundle.cpp 0.00% 17 Missing ⚠️
engine/src/collisions/broad_phase/plugin.cpp 8.33% 11 Missing ⚠️
...gine/src/physics/components/static_body_bundle.cpp 0.00% 8 Missing ⚠️
engine/src/physics/components/inertia.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1570      +/-   ##
==========================================
- Coverage   51.76%   51.03%   -0.73%     
==========================================
  Files         501      506       +5     
  Lines       27267    25506    -1761     
  Branches     2550     2559       +9     
==========================================
- Hits        14114    13018    -1096     
+ Misses      13153    12488     -665     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

Comment thread engine/include/cubos/engine/physics/components/mass.hpp Outdated
Comment thread engine/include/cubos/engine/physics/components/mass.hpp Outdated
Comment thread engine/samples/collisions_areas/main.cpp Outdated
Comment thread engine/samples/collisions_areas/main.cpp Outdated
@fallenatlas fallenatlas force-pushed the 1246-add-triggerarea branch from 760307b to 7283c1f Compare August 21, 2025 19:44
@fallenatlas fallenatlas linked an issue Aug 21, 2025 that may be closed by this pull request
10 tasks
@fallenatlas fallenatlas marked this pull request as ready for review August 21, 2025 23:14
@fallenatlas fallenatlas requested a review from RiscadoA as a code owner August 21, 2025 23:14
@cubos-bot
Copy link
Copy Markdown

cubos-bot Bot commented Sep 23, 2025

@RiscadoA will only be able to review this PR in 5 days.

@RiscadoA RiscadoA removed their request for review September 23, 2025 21:11
Copy link
Copy Markdown
Contributor

@joaomanita joaomanita left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@JoaoTRoxo JoaoTRoxo left a comment

Choose a reason for hiding this comment

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

Looks good to me. The changes are clear and consistent, and I didn't see any issues. Thanks for the thorough implementation.

@fallenatlas fallenatlas merged commit 3440e1f into main Nov 21, 2025
12 checks passed
@fallenatlas fallenatlas deleted the 1246-add-triggerarea branch November 21, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Engine B-Collisions B-Physics C-Tracking-Issue P-Urgent This issue is a big priority, and it would be good to close it ASAP S-Needs-Design Demands some time designing an implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify using physics in games Add TriggerArea

3 participants