No announcement yet.

why LeftMouseButton event doesn't work?

  • Filter
  • Time
  • Show
Clear All
new posts

    Create a 'Custom Event' which 'fires' from PC into your AIController.
    But in general use GameMode / GameInstance etc to manage this.
    Suggest watching a few more tutorials first esp if the AI is instanced.
    Get comfortable with things like Casting / Get All Actors of Class etc...
    What are the BEST Unreal Tutorials / Docs? There are none tbh... Here's why
    Instead its better to just take projects apart (see the free 'creators' listed here)


      Question is, where are you calling the Left Mouse Button event from? From the Player Pawn? From the Player Controller?

      If you are calling it from the AI actor then it's just normal that it doesn't fire.
      You should follow franktech's suggestions, move your logic to a custom event in the AI blueprint, then from your player controller/pawn catch the left mouse button event, on fire find your actor using "Get all actors of class" or in any other way, and call the custom event
      Last edited by snaiperskaya; 03-07-2017, 07:56 AM.


        I created the following blueprint in order to test global var which get location of mouse's cursor hit.

        But it always shows 0,0,0.

        This blueprint is for object (bot).

        Click image for larger version

Name:	ice_screenshot_20170307-232848.png
Views:	1
Size:	63.2 KB
ID:	1124467