selection normal vector debug
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user