While fighting with blueprints, I’m trying to setup an “open world car” actor. You know, an universal car which can be AI controlled, player controlled or unoccupied, which can follow a path/traffic or drive aimlessly with some collision avoidance.
Currently I’m just prototyping AI (braking and collision avoidance) and some global control stuff…I like an idea of speed limiter, so I’m trying to make a good one.
My questions are: what are the correct approaches in questions of some specific parts? Is there a suggested workflow for cars overall? In more details:
- How about the occupancy of the car? My car has an “AI” boolean which controls if the car is AI controlled, I believe it’s the only good approach. How about the player? Should the car also have a boolean for player? If the player couldn’t leave their car, the car itself would be the player pawn and it would be unnecessary because only the player pawn would get inputs. But, what if the player could get out of it? Then the player actor would be still player controlled and the car would simply get its input enabled? Or the car would officially become player controlled and the player’s actor woud becoma “passive”?
- I guess it’s best to firstly setup all of the main control inputs (gas, brakes, steering) as perfectly as it’s currently possible and then setup the AI. Am I right?
- Is there any suggested order while making the car’s AI itself? I’ve reached some basic results in braking and in obstacle avoidance (both while aimless driving mode) but not altogether yet. Is it suggested to, for example, make braking first and then the avoidance?
Thank you for any of your answers.