6#ifndef KPHYSICSMANAGER_H
7#define KPHYSICSMANAGER_H
160 const kVec3 &direction,
161 float maxDistance = 1000.0f);
Runtime wrapper around a Jolt character.
Definition kcharactercontroller.h:47
kVec3 getGravity() const
Returns the current global gravity vector (m/s²).
kPhysicsManager()
Constructs an uninitialised manager; call init() before use.
bool init()
Initialises the Jolt physics engine and internal systems.
kPhysicsRaycastHit raycast(const kVec3 &origin, const kVec3 &direction, float maxDistance=1000.0f)
Casts a ray into the physics world and returns the closest hit.
void destroyObject(kPhysicsObject *object)
Removes a physics body from the simulation and destroys the object.
void destroyCharacter(kCharacterController *character)
Removes a character controller from the simulation and destroys it.
void update(float deltaTime)
Advances the simulation by deltaTime seconds.
void setGravity(const kVec3 &gravity)
Sets the global gravity vector (m/s²).
void shutdown()
Destroys all physics bodies and tears down the engine. Called automatically by the destructor.
kCharacterController * createCharacter(const kCharacterControllerDesc &desc)
Creates a character controller in this physics world.
~kPhysicsManager()
Destroys the manager, calling shutdown() to release all bodies.
kPhysicsObject * createObject(const kPhysicsObjectDesc &desc)
Creates a physics body and returns a new kPhysicsObject.
Represents a single rigid body or trigger volume inside the physics simulation.
Definition kphysicsobject.h:131
Capsule character controller built on Jolt's JPH::Character.
Core type aliases, enumerations, structs, and utility functions used throughout the engine.
Symbol visibility / linkage macro for the Kemena3D library.
#define KEMENA3D_API
Definition kexport.h:35
A single physics body — shape, type (dynamic / static / kinematic / trigger), and runtime controls.
Top-level Kemena3D engine namespace.
Definition kanimation.h:23
glm::vec3 kVec3
3-component float vector.
Definition kdatatype.h:33
Editor-authored description of a character controller.
Definition kcharactercontroller.h:26
All parameters needed to create a kPhysicsObject.
Definition kphysicsobject.h:92
Result of a physics raycast query.
Definition kphysicsmanager.h:23
float distance
Distance from the ray origin to the hit point.
Definition kphysicsmanager.h:25
kVec3 hitNormal
World-space surface normal at the hit point.
Definition kphysicsmanager.h:27
bool hit
true if the ray struck a body.
Definition kphysicsmanager.h:24
kVec3 hitPoint
World-space position of the intersection.
Definition kphysicsmanager.h:26