A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectWoodbox.cc
1#include "ObjectWoodbox.hh"
2
3namespace Kinoko::Field {
4
6ObjectWoodbox::ObjectWoodbox(const System::MapdataGeoObj &params) : ObjectBreakable(params) {}
7
9ObjectWoodbox::~ObjectWoodbox() = default;
10
12void ObjectWoodbox::calcCollisionTransform() {
13 constexpr f32 HALF_SIZE = 100.0f;
14 constexpr EGG::Vector3f POS_OFFSET = EGG::Vector3f(0.0f, HALF_SIZE, 0.0f);
15
16 if (!m_collision) {
17 return;
18 }
19
20 calcTransform();
21 EGG::Matrix34f mat = transform();
22 mat.setBase(3, pos() + POS_OFFSET);
23 m_collision->transform(mat, scale(), getCollisionTranslation());
24}
25
26} // namespace Kinoko::Field
Pertains to collision.