LDCad script integration of LDInspector's collision detection


RE: LDCad script integration of LDInspector's collision detection
#2
Very cool.

What kind of crashes do you mean though, as lua scripts shouldn't be able to crash LDCad in any way.

Some optimizations for you to consider:
- use bounding sphere tests
- avoid wrapper functions like your vsub and vcross etc, while being more readable it will cause more work for the scripting engine.
- use relative data (transform the test intersection line instead of the mesh data), this will avoid having to transform all mesh data and you only need to store information for unique meshes.

Some api extensions that might be useful:
- query mesh bounding information (this is known data inside LDCad and contains all min/max coords you are gathering I think).
- line intersects mesh test function (there is tons of intersection test code inside LDCad, these will also do a sphere/box test before looping all poly's)
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: LDCad script integration of LDInspector's collision detection - by Roland Melkert - 2022-07-09, 20:18

Forum Jump:


Users browsing this thread: 1 Guest(s)