mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Use matrix4::getRotationRadians
This commit is contained in:
parent
b6c71b2379
commit
d74af2f1a7
10 changed files with 34 additions and 28 deletions
|
@ -3239,9 +3239,10 @@ PointedThing Game::updatePointedThing(
|
|||
hud->setSelectionPos(pos, camera_offset);
|
||||
GenericCAO* gcao = dynamic_cast<GenericCAO*>(runData.selected_object);
|
||||
if (gcao != nullptr && gcao->getProperties().rotate_selectionbox)
|
||||
hud->setSelectionRotation(gcao->getSceneNode()->getAbsoluteTransformation().getRotationDegrees());
|
||||
hud->setSelectionRotationRadians(gcao->getSceneNode()
|
||||
->getAbsoluteTransformation().getRotationRadians());
|
||||
else
|
||||
hud->setSelectionRotation(v3f());
|
||||
hud->setSelectionRotationRadians(v3f());
|
||||
}
|
||||
hud->setSelectedFaceNormal(result.raw_intersection_normal);
|
||||
} else if (result.type == POINTEDTHING_NODE) {
|
||||
|
@ -3261,7 +3262,7 @@ PointedThing Game::updatePointedThing(
|
|||
}
|
||||
hud->setSelectionPos(intToFloat(result.node_undersurface, BS),
|
||||
camera_offset);
|
||||
hud->setSelectionRotation(v3f());
|
||||
hud->setSelectionRotationRadians(v3f());
|
||||
hud->setSelectedFaceNormal(result.intersection_normal);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue