Git Product home page Git Product logo

Comments (4)

Mugen87 avatar Mugen87 commented on May 27, 2024

maxTurnRate is actually only intended for rotateTo(). When implementing the method, I have considered to make maxTurnRate a parameter in order to avoid the impression you could use the property for other things, too. However it seemed more convenient to me if the app could configure the turn rate on entity level.

Maybe clarifying the documentation of maxTurnRate is sufficient for now.

from yuka.

discordier avatar discordier commented on May 27, 2024

Another way would be to reorganize the behaviors to not "slide" the entity but rotate and move it where possible.
So the steering force would become a "desired direction" and then we would rotate to said direction and move forward.

I am currently trying to throw together an example for moving a car across hills and stumble into issues of behaviors and the Vehicle class.
Currently it appears as if the Vehicle class is only suitable in very narrow use cases and not when:

  • any vector has a non 0 Y-coordinate (as it moves in a straight line to the target, defying gravity etc., therefore must be UFO-like)
  • the vehicle does not support "in place" rotation and therefore has a limit on rotation radius.

Maybe I am missing something obvious here?

Non the less, the documentation currently is pretty vague about what properties are used for calculation and therefore it would be cool to enhance it. 👍

from yuka.

Mugen87 avatar Mugen87 commented on May 27, 2024

Non the less, the documentation currently is pretty vague about what properties are used for calculation

That's true. Most parts of the documentation mainly describe the class structure but with too less explanations.

the vehicle does not support "in place" rotation and therefore has a limit on rotation radius.

The problem is that the steering model tries to be physically correct whereas non-force based methods like rotateTo() are not. However, there is no problem to combine both approaches in a game. Meaning when the vehicle (or moving entity) stays sill (when it has a zero speed), you can use rotateTo() without issues.

any vector has a non 0 Y-coordinate

That depends on the use case. If you consider FollowPathBehavior, it works fine in 3D space. SeekBehavior works fine if you model something like a rocket.

Keep in mind that games which utilizes navigation meshes, FollowPathBehavior and OnPathBehavior are the most common behaviors. The others are already more specific.

from yuka.

Mugen87 avatar Mugen87 commented on May 27, 2024

Clarified maxTurnRate via bd9d885.

from yuka.

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.