Saga
Saga Game Engine
Loading...
Searching...
No Matches
rigidbody.h
Go to the documentation of this file.
1#pragma once
2
3#include <glm/vec3.hpp>
4
5namespace Saga {
6
12struct RigidBody {
17 enum Mode {
19 Static
20 };
21
23
25 glm::vec3 velocity = glm::vec3(0, 0, 0);
26
31 bool isStatic() { return mode == Static; }
32};
33
34} // namespace Saga
Definition: app.cpp:8
Entities with a RigidBody will be moved by the engine in FixedUpdate, and will respond to collisions.
Definition: rigidbody.h:12
bool isStatic()
Definition: rigidbody.h:31
Mode
Static Rigidbody do not move, and is unaffected by the physics engine. Dynamic RigidBody move and col...
Definition: rigidbody.h:17
@ Static
Definition: rigidbody.h:19
@ Dynamic
Definition: rigidbody.h:18
Mode mode
Mode of this rigidbody. Either Dynamic or Static.
Definition: rigidbody.h:24
RigidBody(Mode mode=RigidBody::Mode::Dynamic)
Definition: rigidbody.h:22
glm::vec3 velocity
Velocity of this rigidbody. Controlled by the Application as well as the Physics Engine.
Definition: rigidbody.h:25