aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Rigidbody.cpp
blob: cf07b0e3679a0bc0f20dfa26fe1e6f12758796a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "Rigidbody.h"

using namespace crepe;

crepe::Rigidbody::Rigidbody(uint32_t game_object_id,
							const RigidbodyData & data) :
	Component(game_object_id), data(data){}

void crepe::Rigidbody::add_force_linear(const Vector2 & force) {
	this->data.linear_velocity += force;
}

void crepe::Rigidbody::add_force_angular(double force) {
	this->data.angular_velocity += force;
}