K
K
Kirill Petrov2015-01-09 10:16:52
JavaScript
Kirill Petrov, 2015-01-09 10:16:52

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

2 answer(s)
A
Alexander Taratin, 2015-01-09
@Recosh

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.

A
Armenian Radio, 2015-01-09
@gbg

If you really want to "read", you need university courses:

  • Linear algebra
  • Analytic geometry
  • Differential geometry
  • Interpolation theory
  • Numerical Methods
  • Theoretical mechanics

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question