variable speed path following
Posted: Fri Jul 29, 2011 4:55 am
Hello
I have a requirement for an entity to follow a path at variable speeds, the speed is controlled by the user, and sometimes can be very high. Picture a high quality slotcar set, like Carerra, or Scalelectrix. In the past, I've tried to setup collision of a keel in a static mesh, the keel attached to the body of the vehicle by some kind of joint constraint, unfortunately, all the available physics/collision libraries fail to do this. It is a difficult use case, as the speeds required need continuous collision detection, and the mass difference between the car and keel is large, the dimensions and tolerances are small, so all the traditional bad use case scenarios together in a single simulation.
So, I've given up on the idea that this can be solved by colliding the keel in the slot. I am now looking at a path following solution. I see that there are a lot of options in BEPUPhysics for setting up a path and path following. Surely, there must be a way to do what I'm after. While I can reliably reproduce the path following demo in my environment, with my meshes and entities, I have not been able to work out how to control the speed of the car, I don't understand how to construct a "speed curve" that seem to be required to use the variable speed curves.
I have imagined that I would setup a capsule on a LineSliderJoint and make that the entity of an EntityMover, the joint being attached to the vehicle body, and consequently pushing, or dragging, rather, the slotcar along the path of the slot. I have not been able to achieve this yet. The idea is that I can use as much as possible of the vehicle dynamics as supplied by the BEPU vehicle model, I want to avoid making everything fake. I've spent 2 years trying and researching to make this happen fully simulated, before I finally conceded that I must fake the keel in the slot.
I would appreciate any suggestions, hints, or even appropriate code modification samples to the BEPU pathfollowing demo to help me get on the right track.
I look forward to any responses I might receive
Thanks,
Ray
I have a requirement for an entity to follow a path at variable speeds, the speed is controlled by the user, and sometimes can be very high. Picture a high quality slotcar set, like Carerra, or Scalelectrix. In the past, I've tried to setup collision of a keel in a static mesh, the keel attached to the body of the vehicle by some kind of joint constraint, unfortunately, all the available physics/collision libraries fail to do this. It is a difficult use case, as the speeds required need continuous collision detection, and the mass difference between the car and keel is large, the dimensions and tolerances are small, so all the traditional bad use case scenarios together in a single simulation.
So, I've given up on the idea that this can be solved by colliding the keel in the slot. I am now looking at a path following solution. I see that there are a lot of options in BEPUPhysics for setting up a path and path following. Surely, there must be a way to do what I'm after. While I can reliably reproduce the path following demo in my environment, with my meshes and entities, I have not been able to work out how to control the speed of the car, I don't understand how to construct a "speed curve" that seem to be required to use the variable speed curves.
I have imagined that I would setup a capsule on a LineSliderJoint and make that the entity of an EntityMover, the joint being attached to the vehicle body, and consequently pushing, or dragging, rather, the slotcar along the path of the slot. I have not been able to achieve this yet. The idea is that I can use as much as possible of the vehicle dynamics as supplied by the BEPU vehicle model, I want to avoid making everything fake. I've spent 2 years trying and researching to make this happen fully simulated, before I finally conceded that I must fake the keel in the slot.
I would appreciate any suggestions, hints, or even appropriate code modification samples to the BEPU pathfollowing demo to help me get on the right track.
I look forward to any responses I might receive
Thanks,
Ray