GithubHelp home page GithubHelp logo

spherical-gravity's Introduction

Spherical-Gravity

Source code from my spherical gravity tutorial, updated for Unity 5. Tutorial availaible here: https://youtu.be/TicipSVT-T8

Your planet object should have the GravityAttractor script attached. It should also have a 'Planet' tag applied, and a layer specified for the ground. This ground layer should be assigned to the grounded mask on the first person character controller.

spherical-gravity's People

Contributors

seblague avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spherical-gravity's Issues

Issues with code or the ReadMe file.

Tried this. Added the fps controller script to a capsule and made the camera a child of the capsule.

Then added the attractor script to an orb. Then added the body script to the capsule.

Set the planet tag on the orb and set the ground layer on the body script.

The fps controller works, yet no gravity.

Highly recommend clarifying the readme file.

Seems like a nice script. Truly appreciate this. Yet, kinda silly have such a vague readme file for a nice project. Unclear what to name the layer mask and so on.

Thanks in advance for updating that. I have learned about the importance of documentation and recommend starting to document concisely. Also recommend using Objective C for a while, to get comfortable with documenting everything.

Backward vector of Camera Look Vector

Hi Sebastian

Thanks for the useful tut on spherical gravity. I have a small feature request if you are able to fit it in. I am a newbie to Unity3d but have some experience in coding. How do you get the backward vector of where the camera is pointing irrespective of the player body?

The idea is to make a thrust gun that when triggered pushes the player body in the opposite direction of where the camera is pointing. Would be cool if it applies to your spherical gravity tut.

Regards

Lee

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.