There are many nice things for detecting conflicts, such as trx.colliders or code snippets here, to questions, but, in fact, most things are deprecated (some functions, such as multiplyVector3, change and others are deleted. I have Object3D (Character Model) and the world (3D models: cars, trees, buildings, etc.). I can move the character using the arrow keys (moving it through translateX / Y to the rendering loop.
What I want is to detect a collision between the character model and everything else (except the earth and some others). Therefore, I need collision detection between Object3D (Character) and WorldObjects [] (all objects).
So, now there are several ways to get the desired result, which is the best (fast and readable) way to do it? And now the problem (maybe), if it works: When a character is faced with something else, how can I stop his movement in this direction, but can he go back or to the right?
source share