Giter VIP home page Giter VIP logo

Comments (3)

ricardojmendez avatar ricardojmendez commented on May 19, 2024

Hi,

I'm not sure what you mean by this:

I've really studied your code and I'm not sure why calling the base to Start, and I even tried calling the base to Awake, didn't find the component before CalculateForce tried asking for it.

Do you mean that there was a Vehicle instantiated, and that the Awake for the Steering was being called, but for some reason _vehicle was still null the first time CalculateForce was invoked?

from unitysteer.

mdeforge avatar mdeforge commented on May 19, 2024

If by instantiated you mean via the Autonomous vehicle component I put on
my game object, then yes, precisely.

I guess I should that I'm not using UnitySteer in it's out of the box
state, but this is one part that I didn't touch. If you're not having the
same error, I'd at least check into whether or not you're getting any sort
of null exception before it successfully grabs the component.

Out of curiosity, could what order I attach the scripts to the game object
matter?

On Thu, Jan 17, 2013 at 3:23 AM, Ricardo J. Méndez <[email protected]

wrote:

Hi,

I'm not sure what you mean by this:

I've really studied your code and I'm not sure why calling the base to
Start, and I even tried calling the base to Awake, didn't find the
component before CalculateForce tried asking for it.

Do you mean that there was a Vehicle instantiated, and that the Awake
for the Steering was being called, but for some reason _vehicle was still
null the first time CalculateForce was invoked?


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-12358472.

from unitysteer.

ricardojmendez avatar ricardojmendez commented on May 19, 2024

Out of curiosity, could what order I attach the scripts to the game object
matter?

It shouldn't, unless you're instantiating them via code at run-time. The queue that ticks the vehicles is created on TickedVehicle.OnEnable, which means that even an over-eager tick should happen after all Awakes have been called.

If you're instantiating them manually, and instantiate the Vehicle after the Steering, then I suppose it is possible.

I'm afraid I haven't seen this issue, and I do use it daily (it's what powers the characters on Hairy Tales). Do let me know if you manage to narrow it down!

from unitysteer.

Related Issues (20)

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.