entity C is a player. entity A and entity B will follow player movement in any formation.

if player keep moving straight, i want to make entity A turn left and walk in same direction of cube side without touching yellow area. entity B is also the same but he will turn right (according to the obstacle in front of him)

need some help.

thanks