I'm trying to use Unity Steer for an MSC project:
My project consists of a flat arena, with cylindrical obstacles, and an AI controlled "Robot".
The player will be able to move on this arena as first person controller, upon mouse click or a key press, an object "food" will be instantiated in front of the player.
The Robot should be idle until a "player proximity" event is triggered, upon which it will wander, avoiding obstacles.
If an instantiated object "food" is present on the scene, the robot will move to target on it, while still avoiding obstacles. The food will disappear after a number of seconds, re-triggering wander. If no more "food" is spawned within a time limit, the robot will tether to base and go idle again. The classic cat and food scenario.
I have the individual behaviors working, with move to point, and wander radar behaviors. I need to merge the two of them, possibly with some form of state machine or behavior tree triggering either of them according to the state of the scene, as I have animation for wheels turning, turning, eat, and waggle tail to be triggered as well depending on state.
I noticed that placing both scripts on the robot component makes the obstacle avoidance brake, even if one of the two scripts is inactive.
I assume I need to write my own behavior and vehicle script, that merges the Arrive and Wander, implementing radar as well, finding this rather difficult.
my question is:
1)What is the best approach to switch between two behaviors/vehicles, do I need to write a new behavior that merges wander and arrive?
2)How do I make the robot look for an object at run-time, currently target is set on awake.
sorry for two questions in one, feel free to edit :)