Answer the question
In order to leave comments, you need to log in
Where can I read about collisions in 3D space?
I'm trying to write a shooter in three js and ran into the problem of finding collisions between objects. Now I have everything built on raycast, but since the beam has no thickness, the rocket that catches the edge of the wall does not explode, it continues to move until it sees an obstacle in the center of coordinates.
The same with the movement of the character, I just look at the rays in different directions and determine the distance to the object, but if there is a narrow column between these rays, then such a raycast will not always detect it and you can get very close to it.
Also, I still don’t know how to determine whether an object or part of an object is visible to the camera
Answer the question
In order to leave comments, you need to log in
Use the physics engine
https://github.com/kripken/ammo.js/
or
https://github.com/lo-th/Oimo.js/ more lightweight, for complex surfaces you will have to pervert, collecting it from cubes - perfect to create minecraft like games. If I understand everything correctly, the original motion on as3 was written for galaxy55.com Now the project is closed.
If you really want to "read", you need university courses:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question