blob: a08a68ecf973849bb8bbfa6f3c8b78a02a0abb7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include "Component.h"
#include "types.h"
namespace crepe {
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
|