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

Zone Component #10

Merged
merged 7 commits into from
Aug 25, 2023
Merged

Zone Component #10

merged 7 commits into from
Aug 25, 2023

Conversation

MAG-AdrianMeredith
Copy link

@MAG-AdrianMeredith MAG-AdrianMeredith commented Jul 28, 2023

See playcanvas#5123 for details
ZoneComponent, required for tracking objects inside of volumes used by reflection probes etc

  1. Adds support for ray casting shapes
  2. Adds full support for the playcanvas 'zone' component which allows areas to be specified to trigger changes on enter leave and track objects inside of it
zonecomponent-test.mp4

Added cast for shapes using `shapeCast` and by configuring the shape. It also provide API for each primitive shapes:
- `boxCast(halfExtends, position, rotation)`
- `capsuleCast(radius, heigh, axis, position, rotation)`
- `coneCast(radius, heigh, axis, position, rotation)`
- `cylinderCast(radius, heigh, axis, position, rotation)`
- `sphereCast(radius, position, rotation)`

There is also a private function `_shapecast(shape, collision, rotation)` if you wish to use your own shape (Ammo.btCollisionShape).
Include full comments and docs. Include assertion of `Ammo.ConcreteContactResultCallback` for every public function. No assertion on private function to reduce function calls.
@MAG-AdrianMeredith MAG-AdrianMeredith merged commit fda2c3c into main Aug 25, 2023
5 of 7 checks passed
@MAG-AdrianMeredith MAG-AdrianMeredith deleted the feat/zone-component branch August 25, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants