GithubHelp home page GithubHelp logo

thomas-rooty / r3f-character-controls Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 67 KB

๐Ÿง A boilerplate for character movement and controls in a Three.js environment using React-Three-Fiber and React-Three-Cannon

Home Page: https://r3f-character-controls.vercel.app

CSS 18.35% TypeScript 80.87% JavaScript 0.77%
drei nextjs physics r3f react-three-cannon threejs ts

r3f-character-controls's Introduction

R3F Character Controls

A robust boilerplate for initiating character movement and controls in a Three.js setting, leveraging the power of React-Three-Fiber and React-Three-Cannon.

Live demo

Live preview of the features, powered by Vercel

Features:

  • Character Movement: Smooth character movement with acceleration and deceleration for a more realistic experience.
  • Camera Control: Dynamic camera positioning that follows the character, ensuring a seamless navigation experience.
  • Collision Detection: Utilizes Three.js raycasting for detecting objects in front of the character and setting interactive objects.
  • Physics Integration: Built-in physics using React-Three-Cannon for realistic object dynamics.

Setup:

Clone the repository:

git clone https://github.com/thomas-rooty/r3f-character-controls.git

Navigate to the project directory and install the dependencies:

cd r3f-character-controls
npm install

Run the development server:

Copy code
npm start

Now, you should be able to see the boilerplate in action on your local server!

Customization:

  • Character Attributes: Adjust the character's attributes such as speed, mass, and geometry within the Character component.
  • Camera Positioning: Modify the camera's distance and angle with respect to the character by tweaking the distance variable.

Contributions:

Contributions, issues, and feature requests are welcome! Feel free to check issues page

r3f-character-controls's People

Contributors

thomas-rooty avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.