branchrust_reboot/main/naval_update/scientist_boat_aicancel
111 Commits over 31 Days - 0.15cph!
Actually fill the RHIB with scientists when you attach
naval_update -> scientist_boat_ai
More Waterworld map obstacles
Remove resolution field - not used
Standard RHIB cleanup
Rewrite steer force system again (third times the charm)
Boat position is merged with desired directional point before application
Manifest
Seek out targets that attack us eg if you're attacked by someone then set them as the target
naval_update -> scientist_boat_ai
Balancing forces like a fckn seesaw
Target takes priority
Avoidance is second unless its too close
Wander forces as third
Fix getting stuck in the wander state if we exit seek without reaching our target
Better navigation through smaller pathways (obstacles on left and right) but clear ahead
Only handle the reverse case if the front is blocked (not the sides)
Just used lock steering - players do this anyway
Better steering tangent calculations (prevents slamming headfirst into walls as much)
Another fresh attempt at new avoidance logic
Can attach boat AI to an existing RHIB
Abstract out the bow and stern transforms to just Vectors (stops allocations for nothing)
Avoidance direction will now favour towards a target if we have one rather than picking a direction from the outside edge in
Boats can now stay close or stay at a distance to a target:
Opens up the ability for single boats to engage closly with the group staying a bit away
Refactor targetting checks into Check class
Dont target fresh players:
Onland
In helicopters
Too far above us
naval_update -> scientist_boat_ai
Fixed problematic range mapping
ignore obstacle logic running when the desired pedal is meant to be around 0
Force a reverse of at least x seconds
Fix steering and gas pedal hallucinations
Allow full stop in seek state
Use parent boat transforms rather than the childs transform, this preserves rotation when working in global space
Use 2D Distance instead
Compile fix
If we are too close the closest obstacle then attempt to back up - stops us getting stuck in weird places
Avoidance steering is now lerped onto the desired steering with distance to the obstacle as a weight
Clearer target logic
Auto pursue system
Debug visuals and extra states so i can adjust movement target in real time for testing
Fixed avoidance behaviour saving and keeping the 'closest obstacle' when it doesnt exist anymore
Refactored obstacle avoidance logic into its own file
Better abstracted targetting, so we can test better
State agnostic methods will check if we have a target or not - force the right state in both ways
Pursuit state sets right gas pedal depending on distance
Pursuit state sets the right steering setup as well
Locked to just players for now - this wont do
When changing into wait state then take the foot off the throttle
Pursue target aquisition
Target validity methods
Run thought logic at a lower frequency to action logic
New wait state
MAX/MIN times to be in wander and wait
Move between wandering and waiting if you've been stuck in a state too long
naval_update -> scientist_boat_ai
naval_update -> scientist_boat_ai
Much better avoidance results - higher speed in general
Desired gas pedal now goes through a processing layer to stop values that would intentionally crash us into obstacles
naval_update -> scientist_boat_ai
naval_update -> scientist_boat_ai
Can drive in between obstacles better
Left side preference seems to be the way to go
Increase distance awareness
Better avoidance model
Rather than appending left,right,left,right directions append all left centre then right
When picking an avoidance direction attempt to pick a side that that containues with the ongoing steer, eg pick a left side if currently going left
Flip steering direction (was steering left when meant to be right)