Skip to content

Rename entity properties in ContactPair and ContactConstraint#719

Merged
Jondolf merged 2 commits into
mainfrom
more-renames
May 4, 2025
Merged

Rename entity properties in ContactPair and ContactConstraint#719
Jondolf merged 2 commits into
mainfrom
more-renames

Conversation

@Jondolf

@Jondolf Jondolf commented May 4, 2025

Copy link
Copy Markdown
Member

Objective

Follow-up to #718.

ContactPair has entity1, entity2, body_entity1, and body_entity2, while ContactConstraint has entity1, entity2, collider_entity1, and collider_entity2. The entity specifiers are kind of unnecessary, and it'd be nice if the names were more consistent and entity1 and entity2 were more explicit about whether they are the collider or body entities.

Solution

Rename the properties such that both ContactPair and ContactConstraint have collider1, collider2, body1, and body2.


Migration Guide

  • ContactPair: The entity1 and entity2 properties are now collider1 and collider2, and body_entity1 and body_entity2 are now body1 and body2.
  • ContactConstraint: The entity1 and entity2 properties are now body1 and body2, and collider_entity1 and collider_entity2 are now collider1 and collider2.

@Jondolf Jondolf added A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality M-Migration-Guide A breaking change to Avian's public API that needs to be noted in a migration guide C-Code-Quality Improvements to code readability, maintainability, or best practices labels May 4, 2025
@Jondolf Jondolf added this to the 0.3 milestone May 4, 2025
@Jondolf Jondolf enabled auto-merge (squash) May 4, 2025 17:56
@Jondolf Jondolf merged commit c505c9d into main May 4, 2025
5 checks passed
@Jondolf Jondolf deleted the more-renames branch May 4, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality C-Code-Quality Improvements to code readability, maintainability, or best practices M-Migration-Guide A breaking change to Avian's public API that needs to be noted in a migration guide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant