mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
selection normal vector debug
This commit is contained in:
parent
0c35eeb072
commit
cee0214ac5
5 changed files with 17 additions and 1 deletions
|
|
@ -107,6 +107,8 @@ void CameraControl::update(PlayerInput& input, float delta) {
|
|||
}
|
||||
|
||||
vec3 PlayerController::selectedBlockPosition;
|
||||
vec3 PlayerController::selectedPointPosition;
|
||||
vec3 PlayerController::selectedBlockNormal;
|
||||
int PlayerController::selectedBlockId = -1;
|
||||
|
||||
PlayerController::PlayerController(Level* level, const EngineSettings& settings)
|
||||
|
|
@ -179,6 +181,7 @@ void PlayerController::updateControls(float delta){
|
|||
player->update(level, input, delta);
|
||||
}
|
||||
|
||||
#include <iostream>
|
||||
void PlayerController::updateInteraction(){
|
||||
auto contentIds = level->content->indices;
|
||||
Chunks* chunks = level->chunks;
|
||||
|
|
@ -206,6 +209,8 @@ void PlayerController::updateInteraction(){
|
|||
player->selectedVoxel = *vox;
|
||||
selectedBlockId = vox->id;
|
||||
selectedBlockPosition = iend;
|
||||
selectedPointPosition = end;
|
||||
selectedBlockNormal = norm;
|
||||
int x = (int)iend.x;
|
||||
int y = (int)iend.y;
|
||||
int z = (int)iend.z;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue