optimized rendering, fixed dff
This commit is contained in:
@@ -106,6 +106,38 @@ void Player::onBeforePlayerFloorMove(Floor *floor, float &newY)
|
||||
this->mesh.position.y -= -newY * 1.05F;
|
||||
}
|
||||
|
||||
/** Calculates minimum and maximum X, Y, Z of this 3D objects vertices + current position */
|
||||
// void Mesh::getMinMax(Vector3 *t_min, Vector3 *t_max)
|
||||
// {
|
||||
// Vector3 calc = Vector3();
|
||||
// u8 isInitialized = 0;
|
||||
// for (u32 i = 0; i < 8; i++)
|
||||
// {
|
||||
// getFarthestVertex(&calc, i);
|
||||
// if (isInitialized == 0)
|
||||
// {
|
||||
// isInitialized = 1;
|
||||
// t_min->set(calc);
|
||||
// t_max->set(calc);
|
||||
// }
|
||||
|
||||
// if (t_min->x > calc.x)
|
||||
// t_min->x = calc.x;
|
||||
// if (calc.x > t_max->x)
|
||||
// t_max->x = calc.x;
|
||||
|
||||
// if (t_min->y > calc.y)
|
||||
// t_min->y = calc.y;
|
||||
// if (calc.y > t_max->y)
|
||||
// t_max->y = calc.y;
|
||||
|
||||
// if (t_min->z > calc.z)
|
||||
// t_min->z = calc.z;
|
||||
// if (calc.z > t_max->z)
|
||||
// t_max->z = calc.z;
|
||||
// }
|
||||
// }
|
||||
|
||||
/** Update player position by gravity and update index of current floor */
|
||||
void Player::updateGravity(Pad &pad, FloorManager &floorManager)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user