small refactoring
parent
2b39c00b6c
commit
0929f9c3a8
|
@ -19,7 +19,7 @@ class Shooter final : public Engine {
|
|||
private:
|
||||
std::shared_ptr<Player> player = std::make_shared<Player>(ObjectNameTag("Player"),
|
||||
ShooterConsts::CUBE_OBJ,
|
||||
Vec3D{1.5, 1.9, 1.5});
|
||||
Vec3D{1.5, 1.2, 1.5});
|
||||
std::shared_ptr<PlayerController> playerController = std::make_shared<PlayerController>(player, keyboard, mouse);
|
||||
|
||||
Window mainMenu;
|
||||
|
|
|
@ -38,7 +38,7 @@ void HitBox::generateSimple(const Mesh &mesh) {
|
|||
|
||||
for(const auto& t : mesh.triangles()) {
|
||||
for(int i = 0; i < 3; i++) {
|
||||
auto point = Vec3D(t[i]);
|
||||
auto point = mesh.model()*Vec3D(t[i]);
|
||||
if(point.x() > maxX) {
|
||||
maxX = point.x();
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void HitBox::generateDetailed(const Mesh &mesh) {
|
|||
|
||||
for (const auto& t : mesh.triangles())
|
||||
for (int i = 0; i < 3; i++)
|
||||
points.insert(Vec3D(t[i]));
|
||||
points.insert(mesh.model()*Vec3D(t[i]));
|
||||
|
||||
_hitBox.reserve(points.size());
|
||||
for (const auto& it : points)
|
||||
|
|
Loading…
Reference in New Issue