Answer the question
In order to leave comments, you need to log in
How to make a camera that calculates collisions?
For several days I have been creating an engine based on OpenGL technology in Java, but I ran into a problem, I just can’t find normal lessons on the Internet on creating a camera that would calculate collisions and not pass through an object.
PS I am programming in Java using the LWJGL
PSS library. And I didn’t find any lessons on writing a normal camera either, so I took someone else’s code, took the camera code from there and converted it into a separate class.
Answer the question
In order to leave comments, you need to log in
I would take a look at jbullet .
It's ancient and hasn't been maintained for a long time, but for general tasks it should be enough.
In principle, you can stick the camera into a transparent ball, attach it to the center, taking into account the orientation along one or two axes, and calculate collisions. Get Zorb.
Unfortunately, I have not seen actual 3d nat. engines for Java.
Yes, and usually most often you have to write under pure C, without pluses.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question