Trying to get the position on the face where the rays intersect the voxel. Some promising first results.

This commit is contained in:
MitchellHansen
2017-01-16 20:36:15 -08:00
parent abec38e7c7
commit a812fba43c
4 changed files with 189 additions and 112 deletions

View File

@@ -126,11 +126,11 @@ void Camera::recieve_event(VrEventPublisher* publisher, std::unique_ptr<vr::Even
}
}
else if (event->type == vr::Event::KeyHeld) {
else if (event->type == vr::Event::KeyPressed) {
vr::KeyPressed *key_event = static_cast<vr::KeyPressed*>(event.get());
if (key_event->code == sf::Keyboard::M) {
if (key_event->code == sf::Keyboard::Y) {
if (mouse_enabled)
mouse_enabled = false;
else