mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix renderHands with third person cameras
This commit is contained in:
parent
2c16f986e1
commit
e217476e84
7 changed files with 25 additions and 23 deletions
|
|
@ -41,7 +41,7 @@ CameraControl::CameraControl(
|
|||
const std::shared_ptr<Player>& player, const CameraSettings& settings
|
||||
)
|
||||
: player(player),
|
||||
camera(player->camera),
|
||||
camera(player->fpCamera),
|
||||
settings(settings),
|
||||
offset(0.0f, 0.7f, 0.0f) {
|
||||
}
|
||||
|
|
@ -353,7 +353,7 @@ static void pick_block(
|
|||
voxel* PlayerController::updateSelection(float maxDistance) {
|
||||
auto indices = level->content->getIndices();
|
||||
auto chunks = level->chunks.get();
|
||||
auto camera = player->camera.get();
|
||||
auto camera = player->fpCamera.get();
|
||||
auto& selection = player->selection;
|
||||
|
||||
glm::vec3 end;
|
||||
|
|
@ -416,7 +416,7 @@ voxel* PlayerController::updateSelection(float maxDistance) {
|
|||
void PlayerController::processRightClick(const Block& def, const Block& target) {
|
||||
const auto& selection = player->selection;
|
||||
auto chunks = level->chunks.get();
|
||||
auto camera = player->camera.get();
|
||||
auto camera = player->fpCamera.get();
|
||||
|
||||
blockstate state {};
|
||||
state.rotation = determine_rotation(&def, selection.normal, camera->dir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue