How can I get my current player's index?
Hey guys, I am working in the level blueprint and I am attempting to add an impulse to an object in the direction that my player is looking. However, it is going to be for a split screen game and I need the impulse to work with both my first player and second player independently, so when the first player adds the impulse it will go in the direction that he is looking and when the second player adds the impulse it will go in the direction that he is looking. As of now I have what is pictured below. This creates a problem when the second player attempts to impulse the object, as it goes in the direction that the first player is looking. Would there be a way to get the player index to set which player is impulsing the object so the rotation will be set accordingly? Thanks a lot!
if you move your input from level blueprint into the player controller blueprint (or character), you will be able to more easily determine who is providing the input to then execute the event on the correct player. here's an example:
- create an event dispatcher that includes an input parameter for the controller
- bind the event to the level blueprint, and call whatever function you want with that event, including the use of the player controller passed into that event. then you can determine if player 1 provided the input or player 2.
answered Mar 10 '16 at 06:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here