Coder Social home page Coder Social logo

Comments (3)

alessiogambi avatar alessiogambi commented on August 16, 2024

I see inside script.ai that there's a variable named loopType which decides whether or not to teleport the car. However, I cannot understand why my script triggers such behavior. My Ai Script is defined starting from the current position of the car but somehow the car is moved back by some distance? The only idea I have is that the car cannot reach the point in time for some reason so it needs more space to drive? But in this case, why not driving slower?

from beamngpy.

alessiogambi avatar alessiogambi commented on August 16, 2024

I can explain this behavior as follow: in my code, I do not specify the initial dir and the up dir so BeamNGpy infers them from the first two nodes of the script, which happen to be placed on a turn in my case. Because of this, the computed direction is different than the current one, and BeamNG teleports my car accordingly (to fit both the given direction and "distance" to the first node)

from beamngpy.

Palculator avatar Palculator commented on August 16, 2024

This should be fixed in v1.16. The vehicle will now never be teleported and will simply drive to the first point in the script. If you want to teleport it nonetheless, it's possible with: https://beamngpy.readthedocs.io/en/latest/api/beamngpy.html#beamngpy.beamng.BeamNGpy.teleport_vehicle

from beamngpy.

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.