branchrust_reboot/main/naval_update/boat_building/directional_dragcancel
8 Commits over 0 Days - ∞cph!
cleanup
left note for possible change to how angles are populated if it proves a performance issue
added command to print DragByAngle table of a boat you're looking at (admin only)
reduced ray count slightly and only recaching BoatBuildingBlocks if the list is empty
better ray batching, as always it's bottlenecked by Verify
- added GamePhysics.SortDeferred which returns the sort JobHandle, useful in this case where we're scheduling multiple parallel batches
mapped accumulated area to drag values, needs further balancing but adjusts between 0.8->1.5 rang currently
- using batched casts, still a bit slow
- substepping drag values between angles for continuous values
initial WIP directional drag (not balanced and not fast)
- take a set of planes offset from hull block bounds at a regular set interval
- project min/max bounds extents onto plane and perform a set of raycasts in flow direction and use dot of normal against -flow to scale drag impact and accumulate
- drag is saved per-angle and will update for the boat at set intervals by slerping between nearest values to current angle of velocity against forward
- considering this as "drag" currently, but may apply this as a force for easier control
structure to query drag by angle from flattened pre-baked data (dummy data for testing)