itch.io is community of indie game creators and players

Devlogs

Add raycast triggers and modes: closest, any, all

Construct 3 3D Physics
A browser asset pack made in HTML5

Add raycast triggers and modes: closest, any, all

  • Add OnAnyRaycast Result - regardless of tag
  • Add OnRaycastResult(tag) - only Results marked with 'tag' cause the trigger

For modes 'closest' and 'any' there is only one raycast result and it is synchronous, so it is optional to use triggers, the data is available after the raycast event.

For mode 'all' - raycast triggers are generated for every body that the raycast hit and the RaycastResult data reflects the data for each hit. In this way all of the hits in mode all can be processed as they cause a trigger.

If raycasts don't hit any body, a trigger is still generated, but the hasHit value will be 0 (false).

Files

  • mikal_cannon_3d_physics-1.13.0.c3addon 85 kB
    Oct 30, 2023
  • Raycast triggers.c3p 1,013 kB
    Oct 30, 2023
Download Construct 3 3D Physics
Leave a comment