branchrust_reboot/main/naval_update/scientist_boat_aicancel
133 Commits over 61 Days - 0.09cph!
Finally! Working 360 degree avoidance (sixth attempt at avoidance, seems to be the final version!)
Stop NPCs on the boat from being targetted as enemies (boat would drive around in circles trying to get close to a passenger)
Fix Y values screwing up our targetting vector logic
Obstacle system was transforming direction when it didnt need to
Ensure a full 360 degrees of directions are generated
Add proper support for reversing - use the dot product to determine when behind
Fix a bunch of incorrect vector space translations
More debugging
Clamp danger values
Local to world (not the other way around)
Increase context resolution
Harder steering over lower values
Rip out the old boat ai steering behaviour and fully replace it with a context driven version|
Retain a map of interest and danger that correlates to a fixed set of directions around the boat
Weight everything up and take the path of most interest + least danger
naval_update -> scientist_boat_ai
Better spacing values
Disable RHIBs spawning in the deepsea for now
Messing with deepsea values
Added AI RHIBs to the deep sea
Codegen
General cleanup
Deep sea specific RHIB prefab
Stop the boat driving if the driver gets doinked
Driver no longer has a gun out
Reduce number of feelers
Prioritise forward direction
Try to avoid flicking between similar directions
Fifth attempt at avoidance logic
Fix broken bounds on the rhib storage drybox
Remove mounting debug code
Setup RHIB specific scientists
Fix bounds on the new RHIB (actually play impact effects)
Manifest
Add support for spawning the new scientists, but lets stay with the old ones for now
Swap avoidance Physics.Spherecast to GamePhysics.TraceAllUnordered, should be a bit more reliable
Further simplification to avoidance code, not 100% sold on it so im commenting out for now
Allow head look (lets the scientists actually target things) whilst they are on the boat
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