Space Engineers Feedback

7
Votes
Add OrientedBoundingBox to Sandbox.ModAPI.Ingame.MyDetectedEntityInfo
At present, the MyDetectedEntityInfo structure returns only a world-aligned bounding box from which it is impossible to infer the detected entity's oriented bounding box. It is possible to take the world-aligned bounding box and orient it such that it is aligned with the ship, but this is often much larger than the ship and thus not accurate. (An example of the world-aligned bounding box being larger can be found here: https://cdn.discordapp.com/attachments/166886199200448512/32116345842744576/image.png and a diagrammatic version can be found here: http://i.imgur.com/QmrqgKU.png) I suggest adding the oriented bounding box to make scripted collision avoidance systems more plausible, which would in turn facilitate better automated piloting and landing scripts, as well as potentially better scripted AI.


Pharap shared this idea 14/09/17 22:01
Whiplash141 15/09/17 00:16
Issue is that Entity Aligned BBs are very expensive to make compared to World AABBs. Also, you can get pretty good colision avoidince just using World AABB's.
tryler12 15/09/17 02:40
The first link to an image is broken. I would suggest reuploading the image to Imgur.
Pharap 15/09/17 02:50
@Whiplash141 Expensive in terms of space or processing power? Are OBBs not just two (3-component) vectors (the same as an AABB) plus a (4-component) quaternion? In terms of space that's cheaper than a matrix. If you mean in terms of processing power, yes they can be. An alternative might be to provide the data that would allow the script to construct an OBB from the detected entity info. @tryler12 Uploaded here: https://preview.ibb.co/mWZE3k/image.png You can get reasonably decent collision avoidance, but not precise collision avoidance.