Document raycasting

This commit is contained in:
Dane Johnson
2021-04-21 21:30:48 -05:00
parent fa20631e7b
commit c68ee69c9b
2 changed files with 10 additions and 1 deletions

View File

@@ -27,6 +27,9 @@
#include "Rigidbody.h"
/**
Holds information about the results of a raycast
*/
struct RaycastResult {
bool hit;
Vector3 position;
@@ -54,6 +57,12 @@ public:
*/
void Step(float delta);
/**
Performs a raycast
@param from the start location of the raycast
@param to the end location of the raycast
@returns a RaycastResult with data collected by the raycast
*/
RaycastResult Raycast(const Vector3 &from, const Vector3 &to);
private:
static World* world;