Skip to content

Fixed Capsule collider generating incorrect dimensions - #848

Open
Elevons wants to merge 5 commits into
BabylonJS:masterfrom
Elevons:master
Open

Fixed Capsule collider generating incorrect dimensions#848
Elevons wants to merge 5 commits into
BabylonJS:masterfrom
Elevons:master

Conversation

@Elevons

@Elevons Elevons commented May 3, 2026

Copy link
Copy Markdown

Capsule Collider was creating the a collider with the wrong dimensions, fixed it! :)


private _createCapsuleCollisionMesh(sourceMesh: AbstractMesh, boundingInfo: BoundingInfo): void {
const size = boundingInfo.boundingBox.maximum.subtract(boundingInfo.boundingSphere.minimum);
const size = boundingInfo.boundingBox.maximum.subtract(boundingInfo.boundingBox.minimum);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice catch! I missed that part!
Replacing boundingBox by boundingSphere on both minumum and maximum did not do the trick?

{this._getCollisionType(this._collisionMesh, "lod", <GiMeshNetwork size={42} />)}
</div>
<>
<EditorInspectorSwitchField

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just ot understand, what is the purpose of it?

@julien-moreau

Copy link
Copy Markdown
Contributor

@Elevons any news?

@Elevons

Elevons commented Jul 28, 2026

Copy link
Copy Markdown
Author

Sorry, on what?

@julien-moreau

Copy link
Copy Markdown
Contributor

Sorry, on what?

I reviewed and asked some questions about the features you are adding in this PR

@Elevons

Elevons commented Jul 31, 2026

Copy link
Copy Markdown
Author

I think I've answered them all now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants