Giter Club home page Giter Club logo

udon-cgs's Introduction

Udon-CGS

Udon Climbing/Gliding/Swimming System (VR Only)

(Using Cancerspace for underwater effects)

How to use Udon CGS System :

  • Install VRChat SDK (with Udonsharp) if it is not already done, and setup layers by testing your world (Verify every object Networking is in manual except climbingstations)
  • Setup layers 23(Climbable surfaces), 24(Swimming volumes), and 25(Climbing Stations) (Edit -> Project Settings... -> Physics)

alt text

  • Import CGS Package and drag and drop Udon CGS System in the scene (Don't change the names of the objects!)

  • If you plan to have more than 40 players in your world, duplicate the climbing stations in the same way it is in the package (1 station for 1 player) (It must have the name : "Climbing Station(##)")

  • Place climbable objects by using usual colliders and set the layer to Climbing (Use trigger if you want to go throught the object)

  • Place swimming water volume (Just create an empty object, add a collider script, enable Is Trigger, change the layer to swimming and set up correctly the volume where you can swim)

How to disable some parts of the system :

  • To disable by default a system, make the Game Object non active(ClimbingSystem, SwimmingSystem or Glider)

  • <!!!> If you are disabling a system in game, consider using .Disable<Climbing/Swimming/Gliding>() (Replace <...> by your system) before disabling the Game Object

  • To disable stamina, you can hide it by making the object LPlayerInfo(Under LocalPlayerInfo) unactive and put the stamina cost(or stamina per second) to 0 on the three systems)

Adding your Audio(1.0.2) :

- For climbing, go in ClimbingSystem and then in the Climbing Sound and place a sound that plays each time you touch a wall
- For Gliding, put a short looping sound in Glider -> Gliding Sound that plays when you are gliding

Settings :

Stamina

 - Maximum stamina (PlayerInfo : Max Stamina) : Default 100
 - Delay after action to begin regaining stamina (PlayerInfo : Regen Stamina Time) : Default 5
 - Stamina Recovering Speed (PlayerInfo : Regen Stamina Speed) : Default 20
 - Cost on the three systems

Gliding

- Minimum height from the ground to start gliding (Glider : Gliding Height) : Default 0.5
- Vertical speed towards the ground when gliding (Glider : Gliding falling rate) : Default 1
- Maximum speed when gliding (Glider : Max Gliding Speed) : Default 20
- Gliding Acceleration (Glider : Gliding Acceleration) : Default 20

Swimming

- Swimming power multiplicator when you don't have enought stamina (SwimmingSystem: No Stamina Power Mul) : Default 0.1
- The acceleration you get by swimming with your hands (SwimmingSystem : Swimming Power) : Default 0.05
- The under water drag factor which limits your speed (SwimmingSystem : Under Water Drag) : Default 0.2

Haptics :

- Amplitude
- Frequency
- Duration(Climbing only)

In game usage :

  • Climbing : Put your hand on a structure and hold the index trigger
  • Swimming : The same for water
  • Gliding : Jump and repress the jump button while in the air, then use your joystick to control the direction

udon-cgs's People

Contributors

voheli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

udon-cgs's Issues

Climbable surfaces completely break triggers.

I have a ladder in my world, and it has a trigger next to it that triggers a background music transition. If the player is grabbing onto the ladder, the trigger never registers the player entering it.

Arms disconnecting

It seems that sometimes, while trying to climb, the avatar arms become disconnected from the hand controller input and go on autopilot like during 2D/desktop mode. Any idea why this happens?

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.