hi
I am solving problem, how to implement Reynolds's steering behaviour along with my physical system (box2d).
Has anybody some experience with this?
I have came up with 2 approaches:
1, I will have my own description of game word in steering behavior which I get (somehow) from phys.system and I will calculate everything by myself in steer.behav
2, Every shape I need in steer.behav I create as physical stuff in b2d, and then I let phys.system calculate everything for me, and just queue it every step
3, better way?
Thank You for any feedback!
steering behavior along physical system
Your steering system should only really output forces that are used by the physics system to move objects.
If you need some manner of predictive collision avoidance, check your physics library's documentation; all the good ones have queries (such as raycasts) that you can use to construct avoidance behaviors. There are ample resources describing how to go from sparse raycasts to fairly robust avoidance steering modules.
If you need some manner of predictive collision avoidance, check your physics library's documentation; all the good ones have queries (such as raycasts) that you can use to construct avoidance behaviors. There are ample resources describing how to go from sparse raycasts to fairly robust avoidance steering modules.
Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]
I want to implement similar steering behaviors like the original OpenSteer. It moves with object without physical system (It has its own very lightweight one, just easy mass and forces etc).
So I am looking for the way to let this system cooperate with physical system.
As I said, I want to implement Steering Behaviors (independent on any physical sys.) and then use it in my game with Box2D. Now I looking for the way to interact these two.
For example, steering behaviors has mechanism, to prevent collisions and some mechanism how to solve them. But on the other hand, solving collisions is physical system's work.
Because of steering behaviors does not fumble with reaction to collision and friction (examples) much, it can exists without any sophisticated phys. system (PS).
But how to interact with object in my game scene (walls, obstacles, etc)? Should I have some WorldRepresentation within my steering behavior (SB), which will be initialized from real scene (box2d scene)?
I really do not see the proper interaction among those components (SB, PS).
Another example, SB solves "crowd situation" by applying some Separation behavior. PS solves this for me.
I have some trouble with asking the right question, but I believe, you can understand my problem from the text above. Nevertheless I will try to form some questions:
What is the proper way, to have SB an PS coexisting in one system with preserve SB its function without PS?
what should handle SB and what PS?
Should I calculate forces in SB and handle positions + collisions in SB (OpenSteer-like behav)
or
Should I calculate forces in SB and pass them into PS and let PS handle positions and collisions?
Or else?
Thank for patience!
L.
So I am looking for the way to let this system cooperate with physical system.
As I said, I want to implement Steering Behaviors (independent on any physical sys.) and then use it in my game with Box2D. Now I looking for the way to interact these two.
For example, steering behaviors has mechanism, to prevent collisions and some mechanism how to solve them. But on the other hand, solving collisions is physical system's work.
Because of steering behaviors does not fumble with reaction to collision and friction (examples) much, it can exists without any sophisticated phys. system (PS).
But how to interact with object in my game scene (walls, obstacles, etc)? Should I have some WorldRepresentation within my steering behavior (SB), which will be initialized from real scene (box2d scene)?
I really do not see the proper interaction among those components (SB, PS).
Another example, SB solves "crowd situation" by applying some Separation behavior. PS solves this for me.
I have some trouble with asking the right question, but I believe, you can understand my problem from the text above. Nevertheless I will try to form some questions:
What is the proper way, to have SB an PS coexisting in one system with preserve SB its function without PS?
what should handle SB and what PS?
Should I calculate forces in SB and handle positions + collisions in SB (OpenSteer-like behav)
or
Should I calculate forces in SB and pass them into PS and let PS handle positions and collisions?
Or else?
Thank for patience!
L.
You do not want to duplicate your world representation between physics and steering. Steering should ask questions from the physics system when it needs to know about the geometry of the world. As I said before, this is often done with queries like raycasts or broad-phase collision checks or whatever else your physics library supports. The details of that really depend on your physics library, and again, as I said before, you should consult the documentation for the library to know how best to use it.
And, again, like I said before, the goal is to have your steering system simply emit forces that are fed into the physics system to update object positions/orientations.
And, again, like I said before, the goal is to have your steering system simply emit forces that are fed into the physics system to update object positions/orientations.
Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement