Raycasts & Bounding Volume Hierarchy SDK

Module Description

Our module supports raycasting and a way to group game objects within bounding volume hierarchies (BVH).

 

Users can create objects and insert them into the hierarchical bounding volume manager. Which then, the user could create raycasts and detect collisions with those objects in an efficient, cost-performance manner. Developers looking to use many raycasts for static objects would find this API very useful for cost efficiency.

 

Without BVH, checking raycasting collision is Big O(n), where n is all gameobjects that could possibly be collided. With all game objects grouped in a BVH, checking raycasting collisions at best is Big O(log(n)) and at worst it's O(log(n) * n).

Application Programming Interface (API)

List of scripts:

HierarchicalVolumeManager.js

Raycast.js

BoundingRaycastBox.js

List of functions:

HierarchicalVolumeManager

BoundingRaycastBox

NOTE: BoundingRaycastBox does not need to be used by the client. The HierarchicalVolumeManager handles all of these types of objects. However, the client may use BoundingRaycastBoxes individually if s/he chooses to.

Raycast

Edits to Current Engine API

Transform

NOTE: The client never needs to access this code. This content was included because it was not part of the original game engine API, and these modifications are required for the Raycasting & BVH API to work.

Click For Tutorial

Click For Two Demo Games

Conclusion

Strengths

Weaknesses

Potential Future Improvements