Formation flying....
Posted: Thu Aug 19, 2021 12:40 pm
Ok bit of a general question but I am having a bit of trouble with this...
I have a formation of ships, (the actual formation shapes vary from lines to V's to X's etc)
All the ships are moving via bullet with velocity derived from their forward heading, which in turn is derived from the vector to their target formation slot.
This all works fine, ships effectively home to their formation slot and when in the slot stay there though their initial choice of slot needs more work...once in their slot they proceed along the line fine, until the formation needs to turn.
I have the formation slots controlled by a non physics rig that moves from point to point in space, dragging the slots with it.. but when the formation rig turns with anything more than 10-15 deg angle, I am finding the ships lose their place in the slot, and spin back to find it.. which is not a formation turn.
I can take the slot positions and manually set the ships positions overulling Bullet but that comes out quite jerky and I what I really want are for the ships on the extremes of the wheel or motion to slow, even reverse, or accelerate to stay in their slot.. but its escaping me how to do that, for now.
I have a small video here https://www.patreon.com/posts/55018001
Its important that the ships retain their independence to avoid possible hazards and be able to break out of the formaiton, so I don't want the rig to rigidly overrule bullets movement.
Is there a good way that Bullet can handle a grouping of objects like this?
Im reading more methods on formation movment and getting some good ideas, but bullet needs to be happy with them for them to work and so far I am not getting what I want.
I have a formation of ships, (the actual formation shapes vary from lines to V's to X's etc)
All the ships are moving via bullet with velocity derived from their forward heading, which in turn is derived from the vector to their target formation slot.
This all works fine, ships effectively home to their formation slot and when in the slot stay there though their initial choice of slot needs more work...once in their slot they proceed along the line fine, until the formation needs to turn.
I have the formation slots controlled by a non physics rig that moves from point to point in space, dragging the slots with it.. but when the formation rig turns with anything more than 10-15 deg angle, I am finding the ships lose their place in the slot, and spin back to find it.. which is not a formation turn.
I can take the slot positions and manually set the ships positions overulling Bullet but that comes out quite jerky and I what I really want are for the ships on the extremes of the wheel or motion to slow, even reverse, or accelerate to stay in their slot.. but its escaping me how to do that, for now.
I have a small video here https://www.patreon.com/posts/55018001
Its important that the ships retain their independence to avoid possible hazards and be able to break out of the formaiton, so I don't want the rig to rigidly overrule bullets movement.
Is there a good way that Bullet can handle a grouping of objects like this?
Im reading more methods on formation movment and getting some good ideas, but bullet needs to be happy with them for them to work and so far I am not getting what I want.