Git Product home page Git Product logo

movementcontrollervr's Introduction

A ReactXR movement controller for VR

Goal

A drop in component to enable the more or less standard way to controle movement in VR.

Left controller stick, forward/backward/left/wight: move the player forwards and backwards and sideways

Left controller stick, forward/backward: look down/up, left/right: look left/right

Usage

Just drop the MovementController in and it should work. So:

<VRCanvas>
    <Sky sunPosition={[0, 1, 0]} />
    <DefaultXRControllers />
    <Hands />
    <MovementController />
    <OrbitControls />
    <Plane
        args={[10, 10]}
        rotation={[-Math.PI / 2, 0, 0]}
        position={[0, 0, 0]}
        type="Static"
        receiveShadow
    >
        <meshStandardMaterial attach="material" color="#eee" />
    </Plane>
    <ambientLight />
    <spotLight
        position={[1, 8, 1]}
        angle={0.3}
        penumbra={1}
        intensity={1}
        castShadow
    />
</VRCanvas>

Issues

See github issues.

credits

Based on: https://gist.github.com/mwmwmw/7d8b1d55f8932577e8d96e808edba3b8 Help from: https://github.com/Minty-Crisp

movementcontrollervr's People

Contributors

bloempot71 avatar

Stargazers

Joseph Simpson avatar

Watchers

 avatar

movementcontrollervr's Issues

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.