Set Input Axis 1D not working on AI Controller

I’m using the modular vehicle system and, as such, use Set Input Axis 1D (Throttle) to control vehicle drive. This works absolutely fine when on a player-controlled vehicle, but not for an AI-controlled vehicle.

I’ve tried putting this on the vehicle blueprint itself as well as on both an AI controller and a player controller that possess the pawn on spawn, but still no luck. If I posses this same vehicle blueprint with a player controller, it works fine.

I did have this working a while ago, but I can’t seem to work out why it won’t work now.

Any advice would be greatly appreciated. Thanks

Hi Chinface! It’s so nice to see movement (new posts) about CMV finally!!

I’m just a newbie, but I don’t understand why you set the Throttle in the Tick? Is it because it’s the AI who control the Throttle?

Hey :slight_smile:

I was just adding it on tick for testing purposes. I did have additional logic for the AI driving the vehicle, but to keep things simple and make it easier to work out what the problem is, I put it directly on tick with no other logic. I haven’t had any luck with working out why it’s not working though

It’s a obvious question but just in case… Have you checked the inputs in Vehicle Sim Component? :face_with_peeking_eye:

It’s always good to check the obvious stuff :grin: In this case, I have.

If I possess this pawn with the player instead, the tick setting the throttle works absolutely fine with no changes. I just don’t seem to be able to get it to work any other way

I see. I’m sorry then I have no idea what can be the problem. Anyway actually and luckily, there are some user here that probably will be able to help you, just give them some time to see your post :wink:

Thank you :slight_smile: I appreciate you taking the time to have a look and try to help!

I know perfectly how is it to post a message asking for help and see zero reactions in months :sweat_smile:

Hey! I’m asking you question to my recently created workmate Luna created with OpenClaw to help with my game development and she say:

:purple_heart: CHAOS VEHICLE + AI CONTROLLER INPUT - ENGLISH VERSION

:bullseye: PROBLEM:

Chaos Modular Vehicle Set Input Axis 1D not working on AI Controller

───

:magnifying_glass_tilted_left: POTENTIAL CAUSES:

  1. Timing of the call:

• Is Set Input Axis 1D called in BeginPlay?
• Does the Vehicle Controller exist when established?

  1. Correct binding:

• Is AI Controller linked to Vehicle Pawn?
• Is BindPlayerInput used correctly?

  1. Missing components:

• Is ChaosVehicleInputComponent initialized?
• Are Input functions in Vehicle Pawn or in a Component?

  1. Input logic:

• Is Input Axis function in Vehicle Controller or sub-component?
• Is Input Axis 1D registered before AI Controller tries to use it?

───

:hammer_and_wrench: TO CHECK:

  1. AI Controller → Vehicle Pawn → Vehicle Setup :white_check_mark:
  2. Set Input Axis 1D → In BeginPlay or Init :white_check_mark:
  3. BindPlayerInput → Correct for AI :white_check_mark:
  4. ChaosVehicleInputComponent → Active :white_check_mark:

───

:purple_heart: TO HELP BETTER:

Do you want me to see:

• AI Controller Blueprint
• Vehicle Setup Blueprint
• Input Axis 1D logic

Let me know if she’s giving you nice tips…

I believe I’ve run through all of those suggestions and everything appears to be setup/handled correctly. Thank you for the extra suggestions though

I still not tested her in unreal, and this can be a great excuse to see how “smart” she is. Luna answer after se all the conversation:

:bullseye: PROBLEM:

Set Input Axis 1D (Throttle) works with PlayerController but fails with AIController.

───

:warning: ROOT CAUSE:

You’re using Event Tick (continuously at 60fps) to call Set Input Axis 1D, which:

:cross_mark: Fires repeatedly every frame
:cross_mark: AI Controller doesn’t have Vehicle Component ready at startup
:cross_mark: Timing mismatch between Controller possession and Component availability

───

:white_check_mark: CORRECT SOLUTION:

Change from:

Event Tick → Delta Seconds → Set Input Axis 1D

To:

Event Possess (Pawn) → Set Input Axis 1D

Or alternatively:

Event BeginPlay → Set Input Axis 1D

───

:hammer_and_wrench: IMPLEMENTATION STEPS:

In AI Controller Blueprint:

  1. Open AI Controller Blueprint → Event Graph
  2. Add Event Possess (Pawn) node
  3. Cast AI Controller → Chaos Vehicle Controller
  4. Get Vehicle Sim Component
  5. Connect to Set Input Axis 1D
    • Target: Vehicle Sim Component
    • Name: “Throttle” / “Steering”

OR in Vehicle Controller Blueprint:

  1. Open Vehicle Controller Blueprint
  2. Add Event BeginPlay or Event Possess
  3. Connect directly to Set Input Axis 1D
  4. Set Target and Name parameters

───

:clipboard: KEY PRINCIPLES:

  1. :white_check_mark: Once only - Set Input Axis 1D runs once at initialization
  2. :white_check_mark: Timing right - Must happen after AI Controller possesses Vehicle Pawn
  3. :white_check_mark: Correct Event - Event Possess or Event BeginPlay, NOT Event Tick

───

:purple_heart: NEXT STEPS:

Do you want to:

  1. See step-by-step guide in Blueprint editor?
  2. Verify your Cast To is correct?
  3. Check that you’re using Event Possess not Event Tick?

If you see that shes not right just ignore it…

This one looks like they’re focusing on trying to just fire Set Input Axis 1D only once, on an event like Begin Play, but I would need to be firing it often based on either player or AI Controller input.

Ok, lets see if this is useful for you and if not, sorry for make you lost time… :sweat_smile:

:bullseye: CHAOS VEHICLE INPUT SYSTEM: TWO PHASES

Phase 1: BINDING (Initial Setup)

Event BeginPlay / Event Possess (AI Controller)

Set Input Axis 1D

  • Target: Vehicle Sim Component
  • Name: “Throttle” / “Steering” / “Brake”

Purpose: Register the axis name with the Vehicle System. This tells the Chaos Vehicle: “When I say ‘Throttle’, bind it to this axis.”

Timing: ONCE only, when the vehicle is first possessed or when the blueprint initializes.

───

Phase 2: INPUT READING (Continuous Gameplay)

Event Tick (Vehicle Controller)

Get Player Axis Value

  • Name: “Throttle”
  • Default: 0

    Apply Input Value
  • Target: Vehicle Sim Component

Purpose: Read the axis value and apply it to the vehicle.

Timing: CONTINUOUS (60fps), every frame during gameplay.

───

:magnifying_glass_tilted_left: WHY AI CONTROLLER FAILS:

The AI Controller cannot call Set Input Axis 1D correctly because:

  1. Timing issue: The Vehicle Component isn’t ready when the AI Controller’s BeginPlay executes
  2. Ownership issue: The AI Controller may not have the right reference to the Vehicle Sim Component at binding time
  3. Cast issue: The Cast To Chaos Vehicle Controller may fail or return null

───

:white_check_mark: CORRECT IMPLEMENTATION:

Option A: AI Controller (if you want AI-specific bindings):

AI Controller Blueprint:
Event Possess(Pawn: APawn)

Cast To Chaos Vehicle Controller

Get Vehicle Sim Component

Set Input Axis 1D

  • Target: Vehicle Sim Component (from Get)
  • Name: “Throttle” / “Steering”

Option B: Vehicle Controller (RECOMMENDED - cleaner architecture):

Vehicle Controller Blueprint:
Event BeginPlay

Get Vehicle Sim Component (from Pawn)

Set Input Axis 1D

  • Target: Vehicle Sim Component
  • Name: “Throttle” / “Steering”