different stuff in physics

This commit is contained in:
2026-03-18 18:41:28 +02:00
parent b56d85f95d
commit 79ceac1005
8 changed files with 223 additions and 18 deletions

View File

@@ -33,6 +33,14 @@ typedef struct Quat {
float w;
} Quat;
typedef struct CastResult_t {
bool m_bIsHit;
const struct RapierCollider_t *m_hCollider;
struct Vector m_vCollisionPoint;
float m_fTime;
float m_fDistance;
} CastResult_t;
typedef struct BallShape_t {
float m_fRadius;
} BallShape_t;
@@ -77,6 +85,16 @@ struct RapierPhysicsBody_t *CRapierPhysicsWorld_CreateRigidBody(struct RapierWor
void CRapierPhysicsWorld_Frame(struct RapierWorld_t *this_, float fDelta);
struct CastResult_t CRapierPhysicsWorld_RayCast(struct RapierWorld_t *this_,
struct Vector vBegin,
struct Vector vEnd);
struct CastResult_t CRapierPhysicsWorld_ShapeCast(struct RapierWorld_t *this_,
struct RapierShape_t *pShape,
struct Quat vOrientation,
struct Vector vBegin,
struct Vector vEnd);
struct RapierShape_t *CRapierPhysics_CreateBall(struct RapierPhysics_t *this_,
struct BallShape_t ball);