Comments (4)
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.
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.
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.
Clarified maxTurnRate
via bd9d885.
from yuka.
Related Issues (20)
- WanderBehavior within Navmesh HOT 2
- Efficient way to find an intersection HOT 2
- jsdoc contradiction to code in GameEntity HOT 16
- how to judge arriveBehave over HOT 1
- how to set initial mesh HOT 1
- Request: Pathfinding 3D HOT 4
- Yuka and Babylon.js HOT 5
- Building navmesh HOT 2
- Question: Best Practices HOT 2
- Question: NavMesh HOT 8
- Non-terminating while loop HOT 5
- Is there any way to add obstacles dynamically on a 2D grid? HOT 3
- Building with webpack and es6 modules HOT 5
- SteerBehavior - Vehicle facing the wrong direction HOT 3
- How to generate NavMesh automatically? HOT 3
- NavMeshLoader for Typescript throw reference error for fetch HOT 1
- need explanation for this formula HOT 4
- YUKA findPath is not detecting any collisions in Babylon.js HOT 3
- Pursuit Behavor duplicate gltf model HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yuka.