Categories
Game Creation Mastering Development

Third person and LineTracing C++

Problem I have a crosshair in the middle of the screen. I need to create a lineTrace that passes straight through this crosshair. As this is a third person game, I need the line trace to cast through the crosshair Question How do I do this Code sample #include “GameFramework/PlayerController.h” #include “Engine/World.h” #include “DrawDebugHelpers.h” #include […]

Categories
Development Game Creation

Third person and LineTracing C++

I want the line trace to aim exactly where the cross air is pointing on the middle of the screen. But this is a third person game, I want the line trace to start in front of the pawns location that is casting the line trace and not the camera location, how can I do […]

Categories
Development

Fragment shader draws faces on top of each other, even though it shouldn’t

I’m writing simple 3D world in OpenGL, that can render various stuff. I’m relatively new to OpenGL, and might not notice something, but there’s really big problem with (I guess) fragment shader. What it does is it ignores z-value, and draws faces in order that they were given by index buffer. What I mean by […]

Categories
Development System & Network

BSOD Critical_Process_Died after enabling Windows Defender Firewall

Server 2019 1809 17763.914 running Remote Desktop Services and all updates are applied. On reboot, the Windows Defender Firewall is stopped (even though it is set to automatically start) and when I manually start the service (via any command line, windows services, server manager, defender gui etc.) it BSOD with the error of “Critical Processes […]

Categories
Development

How to retrieve the camera origin/position from the view projection matrix? (OpenGL)

Is there any way to retrieve the camera origin/position from the view projection matrix? (OpenGL) I’m trying to draw the camera’s frustum and I have no problems calculating corners for the Far and the Near planes. But I can’t figure out how to retrieve a point that would represent the camera origin. I was expecting […]

Categories
Development

How to correctly link an opengl program under debian?

To learn how to do opengl, I have a minimalist build system and a toy program. My makefile produces these commands: g++ -O1 -std=c++17 -Wall -Wextra -pedantic -c -o main.o main.cpp g++ main.o -lglfw -lGLEW -lGL -o main In that directory I have a lone main.cpp file. Contrary to many questions here on SO, this […]

Categories
Development

CUDA Ray-Sphere intersection random walk spooky values

Results The above results are the |X|Y|Z|AbsDistance of each sphere intersection, random spooky values appear probably because of a newbie mistake, but I really can’t get it. To be as specific as I can: The following snippet is supposed to calculate the intersection point between a ray and a spherical boundary with a predefined radius […]

Categories
Development

Why does this Cube Generator class not render a cube?

I finished working on the vertices and UV positions for my cube. After seeing it work I decided to make a CubeGenerator class which would do a few things. First it will generate the cube, get position for the cube, then render the cube. However, a few problems emerged. First, the cube does not show […]

Categories
Development

OpenGL beginners program keeps crashing?

I’m starting OpenGL/GLFW and the code seems fine, I looked online and it seems right, however it is late right now so I might be missing something. This code is mostly from a Udemy course and I never started 3D graphics before, only 2D with SFML and that is it. The following code is here […]