I extend my previous basic character controller with physics. Using rapier3D we get a physical world, generate randomized terrain, make our character move on that terrain and interact with other physical bodies!
See previous video:
https://youtu.be/C3s0UHpwlf8
Stackblitz: https://stackblitz.com/github/tamani-coding/threejs-rapier3d-character-terrain-movement
Github: https://github.com/tamani-coding/threejs-rapier3d-character-terrain-movement
(
00:00) - Intro
(
01:04) - rapier3D Introduction
(
02:45) - Combine three.js and rapier3D
(
03:48) - Terrain Generation with Heightfield
(
05:01) - Kinematic Character Controller
(
06:08) - Terrain Collision with Raycasting
(
06:56) - Outro