lakatop / UnityNavigation

0 stars 0 forks source link

"Smart straight line" mutation #31

Open lakatop opened 6 months ago

lakatop commented 6 months ago

Currently - mutation is just randomly changing size of path segment Goal - implement smart mutation that will detect how far agent is from the destination and tries to adjust path segment size accordingly. E.g. when far away from destination, use max agents speed, but as agent gets closer, velocity should slowly decrease. It should also fix the problem of agent being stuck right before the destination (because nextVelocity is always really small or even zero, so the agent doesnt move really). It should detect that agent is really close to destination and just use 1 path segment with remaining distance as segment size, and all other segments should be zero vector. Regarding the "straight line" part - adjust angles so they slowly form straight path to the destination (if possible)