branchrust_reboot/main/snap_deployablescancel
54 Commits over 0 Days - ∞cph!
Snapping for Abyss barrels
Better barrel to barrel snapping
Turn on snapping for bamboo shelves (full size)
Fixed weird menu text error for deployable snapping
Turn on snapping for the command block
Turn on snapping for the beach towel
Prevent pressure pads from being able to be placed on top of each other infinitely
fix chippy arcade machine snapping and corner snapping
Fix twitch rivals desk snapping and corner snapping
Fixed bed corner snapping and regular snapping issues
Fixed legacy furnace corner snapping
Fixed repair bench placing and corner snapping
Fixed composter snapping and corner snapping
Fixed mixing table corner snapping
Fixed electric furnace snapping and corner snapping
Fixed cooking workbench snapping
Fixed large battery snapping and corner snapping
Fixed small battery snapping and corner snapping
Fixed small generator snapping and corner snapping
Fixed abyss barrels snapping and corner snapping
Fixed bamboo barrel snapping and corner snapping
Fixed wicker barrel snapping and corner snapping
Fixed storage barrel b&c snapping and corner snapping
Fixed sofa corner snapping on the right side
Remove 'exact' corner snapping for the sleeping bag - works way better
Greatly improved corner snapping when trying to put 4 boxes in a 4 by 4
Add ability to add general padding
Fixed locker snapping
Can now snap an object by looking at the wall instead of looking at the ground
Better calculations for Y heights
Better Y heights in corners (fixes fridges)
Ensure pivot offset is rotated by rotation first
Slightly increase half shelf bounds (shouldnt affect placement at all but will affect snapping)
Ensure corner pivot point is added, not subtracted
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
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
Allow rotating with R when wall snapping
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