Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add convenience method PhyiscEngine#recomputeCharacterCollider(entity) #4996

Merged
merged 1 commit into from
Feb 13, 2022

Conversation

skaldarnar
Copy link
Member

We have code like this in some place, seemingly to make sure the character collider is recomputed to reflect changed values on the entity's components.

physicsEngine.removeCharacterCollider(entity);
physicsEngine.getCharacterCollider(entity);

With the ability to simply add this as default method implementation in the interface we can provide a documented implementation for this, introducing a better alternative to cryptically calling remove... and get....

…entity)

We have code like this in some place, seemingly to make sure the character collider is recomputed to reflect changed values on the entity's components.

```java
physicsEngine.removeCharacterCollider(entity);
physicsEngine.getCharacterCollider(entity);
```

With the ability to simply add this as default method implementation in the interface we can provide a documented implementation for this, introducing a better alternative to cryptically calling `remove...` and `get...`.
@skaldarnar skaldarnar added Size: S Small effort likely only affecting a single area and requiring little to no research Topic: Physics Requests, Issues and Changes related to bullet, collisions, gravity, etc. Type: Improvement Request for or addition/enhancement of a feature labels Feb 11, 2022
Copy link
Member

@keturn keturn left a comment

Choose a reason for hiding this comment

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

Hmm, there's something going on there I don't understand. I think this is a step in the right direction regardless.

@keturn keturn merged commit f99014c into develop Feb 13, 2022
@keturn keturn deleted the feat/physics-engine-recompute-collider branch February 13, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: S Small effort likely only affecting a single area and requiring little to no research Topic: Physics Requests, Issues and Changes related to bullet, collisions, gravity, etc. Type: Improvement Request for or addition/enhancement of a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants