TombEngine icon indicating copy to clipboard operation
TombEngine copied to clipboard

PointCollisionData class

Open Sezzary opened this issue 1 year ago • 1 comments

Introduces the new and improved PointCollisionData class to replace CollisionResult. The advantage over the old method is that it fetches and caches computationally expensive data only when needed. It can be easily wrapped for the eventual Lua collision detection object. Additionally, it can theoretically plug in with any potential future collision overhaul.

Usage example: auto pointColl = GetPointCollision(pos, roomNumber); int floorHeight = pointColl.GetFloorHeight();

To get a broad overview of this PR, look at Game/collision/Point.h first.

Some general improvements:

  • Added the ability to retrieve top sectors.
  • Added the ability to retrieve ceiling bridge item numbers.
  • Added the ability to query water height values.
  • Provided the option to test environment flags.
  • Bridges are recognised when fetching floor or ceiling normals.
  • Bridges can be wobbled (but not too much).
  • etc.

Sezzary avatar Sep 07 '23 14:09 Sezzary

Full adoption of new functions complete.

Sezzary avatar Mar 10 '24 04:03 Sezzary