Saga
Saga Game Engine
Loading...
Searching...
No Matches
Saga::RigidBody Struct Reference

Entities with a RigidBody will be moved by the engine in FixedUpdate, and will respond to collisions. More...

#include <rigidbody.h>

Public Types

enum  Mode { Dynamic , Static }
 Static Rigidbody do not move, and is unaffected by the physics engine. Dynamic RigidBody move and collide with Static or other Dynamic RigidBodies. More...
 

Public Member Functions

 RigidBody (Mode mode=RigidBody::Mode::Dynamic)
 
bool isStatic ()
 

Public Attributes

Mode mode
 Mode of this rigidbody. Either Dynamic or Static.
 
glm::vec3 velocity = glm::vec3(0, 0, 0)
 Velocity of this rigidbody. Controlled by the Application as well as the Physics Engine.
 

Detailed Description

Entities with a RigidBody will be moved by the engine in FixedUpdate, and will respond to collisions.

Member Enumeration Documentation

◆ Mode

Static Rigidbody do not move, and is unaffected by the physics engine. Dynamic RigidBody move and collide with Static or other Dynamic RigidBodies.

Enumerator
Dynamic 
Static 

Constructor & Destructor Documentation

◆ RigidBody()

Saga::RigidBody::RigidBody ( Mode  mode = RigidBody::Mode::Dynamic)
inline

Member Function Documentation

◆ isStatic()

bool Saga::RigidBody::isStatic ( )
inline
Returns
true if the rigidBody is Static
false otherwise

Member Data Documentation

◆ mode

Mode Saga::RigidBody::mode

Mode of this rigidbody. Either Dynamic or Static.

◆ velocity

glm::vec3 Saga::RigidBody::velocity = glm::vec3(0, 0, 0)

Velocity of this rigidbody. Controlled by the Application as well as the Physics Engine.


The documentation for this struct was generated from the following file: