Home Technical Talk

[UE4] Player Detection in Blueprints using Vehicle player class

polycounter lvl 12
Offline / Send Message
Cglewis polycounter lvl 12
Hey what's up guys!
So I am trying to Detect when the player hits another physics object, I am able to detect when using the default 3rd person player class, but when I hook up a vehicle class blueprint in the same way I am unable to detect the contact. The goal of this is to be able to detect when the player touches/hits an actor then when the actor crosses a trigger volume to reset both the mesh and the player. I think it has something to do with the vehicle class of blueprint....but why? I plan on incorporating MP into this...so referencing the actual blueprint in the level might not be the right way to go, but any ideas or suggestions would be awesome! :)
 ^^Third Person character ^^^whole Blueprint
 ^^vehicle Blueprint

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    1st question, why the level blueprint?
    2nd question, why are you trying to use a hit event when you want overlap/tough?


    If it would be an that, then after that node, you can have a branch, and the input bool can be: another actor->class==your car. This should properly detect contact.
  • Cglewis
    Options
    Offline / Send Message
    Cglewis polycounter lvl 12
    Thanks you for helping me out Obscura,  I had originally thought to use a gamemode blueprint but I think I was running into the same issue I am running into now (sort of) I could not get the actors to be represented in the blueprints. (My 2 Trigger Volumes, Ball mesh, and Player(s)). I also feel that I am handling the event of the ball being returned to the center improperly and need to make that a class so that i may destroy the ball and then respawn it at the center, so i need to make a ball class.

    I am a bit confused by your 2nd question, The player (vehicle) would never overlap the ball (or am i thinking about this too literally?) I want to register when the player touches the ball. If i branch off from the overlap  event trigger (which is tied to the trigger volume) then won't I trigger it when the player enters the trigger volume? 
  • Cglewis
    Options
    Offline / Send Message
    Cglewis polycounter lvl 12
    So i figured it out, the physics settings for the actual car physics asset was set to not generate hit events.
    so now i am able to detect when it touches the ball and i am able to apply my impulse. But I can not move it to a new location.

    I am thinking that i need to re-work this, instead of a level BP i think i need a game type BP, ball class, goal class and the vehicle (player) class.
Sign In or Register to comment.