Elevate Engine 1
Loading...
Searching...
No Matches
Rigidbody.cpp
Go to the documentation of this file.
1#include "eepch.h"
2#include "Rigidbody.h"
6
7namespace Elevate
8{
12
14 {
15 m_data = other.m_data;
16 }
17
19 {
20 m_data.m_force = m_data.m_gravity * m_data.m_mass;
21 m_data.m_velocity = m_data.m_velocity + m_data.m_force / m_data.m_mass * Time::GetDeltaTime();
22 glm::vec3 pos = gameObject->GetPosition() + m_data.m_velocity * Time::GetDeltaTime();
24 }
25}
GameObject * gameObject
Definition Component.h:73
void SetPosition(glm::vec3 pos)
void Update() override
Definition Rigidbody.cpp:18
Rigidbody(const Rigidbody &other)
Definition Rigidbody.cpp:9
static float GetDeltaTime()
Definition Time.h:12