raycasting

How to calculate distance from a player to a dynamic collision point

How to calculate distance from a player to a dynamic collision point Question: I’m trying to create sensors for a car to keep track of the distances from the car to the borders of the track. My goal is to have 5 sensors (see image below) and use them to train a machine learning algorithm. …

Total answers: 1

How do I fix wall warping in my raycaster?

How do I fix wall warping in my raycaster? Question: So I have made a raycaster in python using pygame. I cast my rays little bit by bit and once they’ve hit a wall, I calculate the distance and use that base the height of my walls. The problem is that my walls are curved. …

Total answers: 1