Skip to content

Obstacle Course

Working Example

<>

Description

This example is a mash-up of many previous examples demonstrating a mini platform game with a character that can walk and jump around, with a third person follow camera that you can orbit and zoom.

The goal is to find your way to the finish podium, jumping death defying gaps, avoiding evil spinners, steep slopes and swinging ball chains.

Only the best will make it to the end. Good luck!

The swinging ball chains in this example were created using a series of spheres linked together using the useDistanceConstraint. Periodically, in order to keep the momentum of the swinging, the Cannon body API was used to applyImpulse to the larger ball at the end of the chain.

Follow Cam Example 1 FollowCam
Follow Cam Example 2 Compound Shapes
Trimeshes, ConvexPolyhedrons and Compound Shapes sbcode.net

GitHub Branch

git clone https://github.com/Sean-Bradley/React-Three-Fiber-Boilerplate.git
cd React-Three-Fiber-Boilerplate
git checkout obstacleCourse
npm install
npm start

Comments