Code Monkey home page Code Monkey logo

unity-splines's Introduction

Unity Splines

Unity Version GitHub CodeFactor

GitHub last commit (branch) GitHub last commit (branch)

image

Tool for making navigation bezier splines with points, events and bindings to colliders

Installation

  • Open file manifest.json in your_repo/Packages
  • Under dependencies add following line:
"trismegistus.splines" : "https://github.com/TrismegistusDevelopment/unity-splines.git#upm"
  • Reopen your project in Unity

You should commit manifest.json

Update

  • Open file manifest.json in your_repo/Packages
  • Remove info about this package from lock section
  • Reopen your project

Setting up

  1. Create empty GameObject in scene
  2. Add NavigationManager script on it
  3. Create new NavigationData as suggested in component or directly in Project window and drag to corresponding field

Usage

NavigationManager

image

  • Waypoint coloring gradient - colorize path and waypoints using unity build-in Gradient class
  • Closed spline - to make spline closed/open
  • Stick to colliders - to raycast down from every waypoint and change their position.y if colliders found. Expensive
  • Smoothing per unit - relative value for spline subdivision.
  • Add - adding new waypoint in custom position. Hold shift to quickly add at the end
  • Waypoints
    • Move - moving waypoint to another position in list
    • Del - delete waypoint. Hold shift to quickly delete without prompt
    • Caption - to display in Scene View
    • Basic - if false, caption won't be displayed in Scene View

Follower

image

  • Mode - None Loop Once Ping Pong
  • Manager - select NavigationManager with desired path
  • Speed
  • Follow Rotation - should rotation of Follower changes according to WaypointEntity.Velocity(First derivative)

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.