aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Collider.h
blob: 4344f153018692a218a3cec421c46db51f8e3e97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include "Component.h"
#include "types.h"

namespace crepe {

/**
 * \brief Base collider class
 */
class Collider : public Component {
public:
	Collider(game_object_id_t id, const vec2 & offset);

public:
	/**
	* \brief Offset of the collider relative to the rigidbody position.
	*
	* The `offset` defines the positional shift applied to the collider relative to the position of the rigidbody it is attached to.
	* This allows the collider to be placed at a different position than the rigidbody.
	*
	*/
	vec2 offset;
};

} // namespace crepe