How to realize that an object collides with another object without penetrating, but can slide against this object without using a physics engine
Hi, welcome to the forum.
What do you mean by “object” ?
If you mean primitives, some technics for collision detection are explained here.
Three.js has classes that can help you with this, such as :
Box3 ( axis-aligned bounding box )
OBB ( oriented bounding box )
Sphere
Plane
Ray
If you want to find collision with meshes, you could use Three.js convex hull implementation, although it’s much more costly in performance than colliding primitives. Typically, you want to collide primitive representations of your meshes, for instance the player character might be represented by a sphere, a capsule, or cylinder in the physical world.
1 Like