#pragma once #include "../objects/part.h" #include #include #include struct RaycastResult { rp::Vector3 worldPoint; rp::Vector3 worldNormal; rp::decimal hitFraction; int triangleIndex; rp::Body* body; rp::Collider* collider; RaycastResult(const rp::RaycastInfo& raycastInfo); }; enum FilterResult { TARGET, // The object is captured BLOCK, // The object blocks any objects behind it, but is not captured PASS, // The object is transparent, ignore it }; typedef std::function)> RaycastFilter; void simulationInit(); void syncPartPhysics(std::shared_ptr part); void physicsStep(float deltaTime); std::optional castRayNearest(glm::vec3 point, glm::vec3 rotation, float maxLength, std::optional filter = std::nullopt, unsigned short categoryMaskBits = 0xFFFF);