Physics struct that contains all movement / collision related data for a particular object.
More...
#include <object.hpp>
Physics struct that contains all movement / collision related data for a particular object.
◆ Physics()
| Physics::Physics |
( |
bool |
movable, |
|
|
Collider |
collider, |
|
|
glm::vec3 |
corner, |
|
|
glm::vec3 |
facing, |
|
|
glm::vec3 |
dimensions = glm::vec3(1.0f) |
|
) |
| |
|
inline |
constructor for Physics
- Parameters
-
| movable | Whether or not the object is affected by velocity/gravity |
| collider | Collision type for this object |
| corner | bottom left corner position of the object |
| facing | what direction the object is facing |
NOTE: dimensions is an optional parameter, because most of the time dimensions will be set by the setModel function! NOTE: velocity defaults to 0 NOTE: velocityMultitplier defaults to 1 NOTE: Dizziness defaults to 1
◆ to_string() [1/2]
| std::string Physics::to_string |
( |
| ) |
|
|
inline |
◆ to_string() [2/2]
| std::string Physics::to_string |
( |
unsigned int |
tab_offset | ) |
|
◆ collider
This object's collider type.
◆ currTickVelocity
| glm::vec3 Physics::currTickVelocity |
Tick velocity for knockbacks.
◆ feels_gravity
| bool Physics::feels_gravity |
true if the object that contains this Physics struct feels gravity and false otherwise
◆ movable
true if the object that contains this Physics struct can move and false otherwise
◆ nauseous
Factor for potion of nausea.
◆ shared
Shared physics properties (needed by both the server and the client)
◆ velocity
| glm::vec3 Physics::velocity |
3-D vector that denotes this object's current velocity.
◆ velocityMultiplier
| glm::vec3 Physics::velocityMultiplier |
3-D vector that denotes this object's velocity multiplier.
The documentation for this struct was generated from the following files: