Coder Social home page Coder Social logo

kinematicboatcontroller's Introduction

kinematicBoatController

Kinematic boat controller for Unity

Setup

  • Create a GameObject and put the KinematicManager and WaterProviderBasic on it.
  • On your boat object, add the KinematicController, KinematicBuoyancy, and KinematicBasicVehidle components.
  • Optionally, on your camera add the FollowCamBasic component.

Notes

This is all still very much a work in progress. But hopefully it provides at least a starting point for others who need a kinematic boat controller.

KinematicManager.PenetrationTestMask sets which objects should be checked for penetration, and depenetrate from. KinematicManager.InteractiveObjectMask sets which objects should get pushed away with more force.

Depenetration uses the DepenAccel, DepenDecel, and DepenPushSpeed variables. However for interactive objects DepenPushSpeed is forced to 1. Simple and crude.

KinematicBuoyancy has a number of parameters. Best to just mess around and see what works best. They are preset to reasonable defaults.

KinematicBasicVehicle is a simplified version of one used in our game. It includes some stuff you probably won't need, like the logic for where to handle player vs ai vs remotely controlled vehicles.

It was also having to work with all of those contexts where it became obvious that the only approach that works for all contexts, is for KinematicController to be fed absolute coordinates for position and rotation.

kinematicboatcontroller's People

Contributors

gamemachine 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.