Giter Club home page Giter Club logo

02-newtons-laws's People

Contributors

robmeade 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

02-newtons-laws's Issues

Deprecated public functions for LineRenderer

As of Unity 5.5, the following public functions are deprecated for the LineRenderer;

SetColors
SetWidth
SetVertexCount

These are last documented in version 5.4 of the Unity Scripting API documentation;
https://docs.unity3d.com/540/Documentation/ScriptReference/LineRenderer.html

These public functions are used within DrawForces.cs, which is provided within the NL02 Newtons Laws Assets.unitypackage, linked from Section 2, Lecture 7 (at time of writing). Additionally, these also appear within the PhysicsEngine.cs file, after the changes are made in Section 2, Lecture 13, and subsequently appear in the repository here.

At the time of writing, Unity 2018.2.2f1 still supports them but warns that they are deprecated.

The following lines of code can be used to replace the deprecated function calls and resolve this issue for more recent versions of Unity, 5.6 onwards;

lineRenderer.startColor = Color.yellow;
lineRenderer.endColor = Color.yellow;
lineRenderer.startWidth = 0.2f;
lineRenderer.endWidth = 0.2f;

and

lineRenderer.positionCount = numberOfForces * 2;

About class UniversalGravitation

hi, I am learn this course form udemy now . But I find something weird.
in CalculateGravity()
"physicsEngineA != this" is seemed not necessary.Instance of UniversalGravitation is never equal Instance of PhysicsEngine. on the other world "physicsEngineA != this" is always true.

And if There is only one Instance of UniversalGravitation in the game world.
Just use "physicsEngineA !=physicsEngineB" can get the correct result.

Hypothesis physicsEngineArray={a,b,c}
then
{a} is applied force from
{b,c}

{b} is applied force from
{a,c}

{c} is applied force from
{a,b}

But The object can be dynamically generated, so I think need a global container to memory all instance of PhysicsEngine. and all physicsEngine need to add his self to the container in function start.

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.