Custom ray casting system 14 Aug 2021 17:22

I made a system for ray casting / hitscan which is faster than bullet (Bullet Physics). The system uses AABB (Axis Aligned Bounding Box) calculation for the hit detection.

At first, I'm getting all the hitbox points in ray's POV / local space (Panda3D uses Z-up axis configuration by default). Then I'm searching for min and max of point's X, Y, Z values.

Ray's vector starts in (X=0, Y=0, Z=0) on it's own POV / local space, so hit detection is a simple comparison of min and max values to zero.

Y axis is used for testing against ray's length and direction.


© Copyright 2023 kitsune.ONE team. All Rights Reserved.