When an A-Frame entity uses ammo-shape="type: hull;", it appears to include the geometry of its invisible child entities in the parent's collision shape calculation, even when the default ammo-shape property for the parent is expected to respet includeInvisible: false.
The child entity is configured with its own ammo-body and ammo-shape (and visible="false") solely to act as a kinematic trigger for collision events (like grab detection), but its geometry is unintentionally contributing to the physical size of the parent's main collision body.
I am using AFrame 1.7.1 and aframe-physics-system 4.2.3.
Reproduction Code
<a-scene physics="driver: ammo; debug: true;">
<a-box id="box" height="0.5" width="0.5" depth="0.5" material="color: red;" ammo-body="type: dynamic; mass: 1;" ammo-shape="type: hull;">
<a-box id="inner-box" visible="false" ammo-body="type: kinematic; emitCollisionEvents: true; disableCollision: true;" ammo-shape></a-box>
</a-box>
</a-scene>
Steps to Reproduce:
- Set up the A-Frame scene with the provided code.
- Enable physics debugging (physics="debug: true;").
- Observe the wireframe for the #box parent entity.
Expected Behavior
The element #box ammo-shape (set to type: hull) should only fit the visible geometry of itself. Since the child #inner-box is set to visible="false", and the default ammo-shape propertie includeInvisible is false, its geometry should be completely ignored in the parent's hull calculation.
Troubleshooting Attempts
Tested Removing Child Physics Components. When I remove the ammo-body and ammo-shape components from the #inner-box, the parent's physics shape still calculates its ammo-shape considering the child.
Confirmed Child Components are Necessary: The child's ammo-body and ammo-shape are required so that I can capture grab/collision events on the child (as a trigger) while keeping the parent as the main physical body. Like creating an area arroud the object to act as a area of event trigger for hover and grab.
When an A-Frame entity uses
ammo-shape="type: hull;", it appears to include the geometry of its invisible child entities in the parent's collision shape calculation, even when the defaultammo-shapeproperty for the parent is expected to respetincludeInvisible: false.The child entity is configured with its own
ammo-bodyandammo-shape(andvisible="false") solely to act as a kinematic trigger for collision events (like grab detection), but its geometry is unintentionally contributing to the physical size of the parent's main collision body.I am using AFrame 1.7.1 and aframe-physics-system 4.2.3.
Reproduction Code
Steps to Reproduce:
Expected Behavior
The element
#boxammo-shape (set totype: hull) should only fit the visible geometry of itself. Since the child#inner-boxis set tovisible="false", and the defaultammo-shapepropertieincludeInvisibleis false, its geometry should be completely ignored in the parent's hull calculation.Troubleshooting Attempts
Tested Removing Child Physics Components. When I remove the
ammo-bodyandammo-shapecomponents from the#inner-box, the parent's physics shape still calculates its ammo-shape considering the child.Confirmed Child Components are Necessary: The child's ammo-body and ammo-shape are required so that I can capture grab/collision events on the child (as a trigger) while keeping the parent as the main physical body. Like creating an area arroud the object to act as a area of event trigger for hover and grab.