All Rust commits from Facepunch
main -> snap_deployables
Minor changes
Ensure corner pivot point is added, not subtracted
sleeping bag changes
main -> snap_deployables
Fixed sleeping bag corner snapping Fixed Furnace -> Furnace snapping Some tweaks to locker and fridge (needs more height)
Fixed issues snapping workbench 3 against the wall
Sofa corner padding to .02
" Wicker Barrel Medieval Box Bamboo Barrel Twitch Rivals Desk
" Workbench
Computer station cant connect to other computer stations nearby Ensure sofa and patterned sofa can snap Turn on for: Retro TC Shockbyte TC Small Battery Medium Battery Large Battery Repair Bench Storage Barrels (inc abyss) Chippy Arcade Machine BBQ Water Barrel Small Generator Powered Water Purifier Composter Pressure Plate Disco Floor
Have the ability to turn on and off corner/same deployable snapping on a per object basis
Slightly increase the bounds of furnaces and shelves so they can be used with snapping
Setup new menu option for deployable snapping modes
Much cleaner wall snapping behaviour Setup custom corner padding on each deployable (set up large box)
Snap deployables into corners if you are close enough to the corner of the wall and holding 'shift' Math was a bit difficult here due to a lack of a general wall direction vector: calculating plane corner intersections with wall normals and rayhit points along the wall
Better commit message: Deployables of the same type will now snap together provided they are close enough. Boxes, Shelves will now auto snap etc.
Deployables of the same type will now snap together: Eg walls will snap together
Huge code cleanup Introduce two modes, simple or advanced snapping behaviours
More comments and minor code changes
Try and calculate a rotation which is similar to the original placement rotation (but snapped to the wall) So for example: a box rotated perpendicular to the wall should stay perpendicular even once snapped
More minor adjustments with placement code
Fix items like planters and furnaces from not snapping
Don't bother with any padding, the calculations seem to be perfect
Can't static the directions array, use a pooled list instead
Compile fix
Allow rotating with R when wall snapping
Cleanup
Can no longer use wall snapping to bypass max placement distances for objects Don't safely assume the first snap canditate will be valid
" Cooking workbench Mixing table Shelves Tier 1 -> Tier 3 workbench Small planter Large planter Bathtub and Railroad planter variants Fireplace Half shelves Fridge Sofa Legacy Furnace Table
Can wall snap: Storage locker Small wooden box Electric Furnace Furnace Bed Sleeping bag As well as tc, large box etc.
Swap to raw matricies since we dont have the transform at this point Cache raw entity on socket attribute setup Apply snapping logic to wooden large boxes Take bounds centre into consideration
Finally working snapping Apply global directions again to ensure consistency Flatten normal so we dont get any weird tilting behaviours
Much more reliable snapping behaviour - use normals and offsets in local space instead
More accurate snapping, seems to work more of the time Still some strange bugs on certain surfaces and alignments
Use a socket system instead Defaults to Socket_Free if user isnt using snap This allows more deterministic snap behaviour between client + server when determining placement Use global rather than local directions
WIP
main -> snap_deployables
WIP
Very rubbish first attempt at wall snapping when placing deployables