leberechtreinhold / dba3_tts

A module for playing De Bellis Antiquitatis 3 on Tabletop Simulator
https://steamcommunity.com/sharedfiles/filedetails/?id=2105272640
MIT License
3 stars 2 forks source link

feature: bigger tolerance for snap when bases intersect #13

Closed marcpawl closed 3 years ago

marcpawl commented 3 years ago

As a user I want to make snapping easier so the game is faster to play and less finicky.

If dropping a base, the base intersects with a new one, the this is an invalid position. More than likely the user is trying to snap the bases. When there is an intersection increase the radius used to detect snapping.

marcpawl commented 3 years ago

I will be working on this one in a private repo.

leberechtreinhold commented 3 years ago

Great, thanks! This will be very useful. You can make a fork and make a pullrequest or any other workflow than you like.

leberechtreinhold commented 3 years ago

This has been added on your pull request, works great and with the cache is very useful. I have toyed a bit with it and I think g_max_corner_distance_snap_intersect = 0.8 is even better than 0.6, but I would rather ask first if there may be an issue with it... Looking at the code seems like no problem (although a bit more than that and I think we would run into problems of stacking in formation, since 0.8 is already half a base).