Thanks for looking at it and thank you for your feedback.
There was this idea of N.W.Perry which is still on my todo-list. So if the code would migrate into native LDCad for speed reasons, it would be useful to have Lua functions gathering collision information about colliding parts.
(2022-07-09, 20:18)Roland Melkert Wrote: What kind of crashes do you mean though, as lua scripts shouldn't be able to crash LDCad in any way.Oh, not LDCad crashes, only my script crashes. I'm used to typed programming in Java, and I made tons of really basic mistakes which are impossible in Java at runtime... Even a typo like "[string "colldet.lua"]:547: attempt to call a nil value (field 'sessio')", which feels like a crash to me after starting the script.
(2022-07-09, 20:18)Roland Melkert Wrote: Some optimizations for you to consider:Thanks again. There are some other things on the todo-list for optimization, I will add your points. Your point "use relative data" I have to think about... Wouldn't this require doing much more matrix multiplications if the bounding boxed intersect often?
(2022-07-09, 20:18)Roland Melkert Wrote: Some api extensions that might be useful:Hmmmmm. This would be really useful. If the intersection tests were native LDCad functions, I would assume that they are a lot faster. And, hum, if the intersection tests are all there, there is not much left to do in Lua for the collision detection... So how about integrating this completely?
There was this idea of N.W.Perry which is still on my todo-list. So if the code would migrate into native LDCad for speed reasons, it would be useful to have Lua functions gathering collision information about colliding parts.