User Tag List

Results 1 to 6 of 6

Thread: Snapping two actors to the same location?

  1. #1
    0

    Snapping two actors to the same location?

    First a heads-up. I've watched a ton of tutorials on all kinds of topics, but I am still very, very new to ue4.
    What I am trying to do is get two actors, the player and NPC, to snap to one spot.
    right now, this isn't going to be for anything polished or extremely functional...
    I just need somebody to show me the basics behind getting both blueprints (the player character and the NPC character) to respond to the same trigger event at the exact same time.
    What I'd like to do, for now, is just push a button... like the E key... and just see them both pop to the same spot.
    Can somebody please walk me through this? And, if possible (I know I am asking a lot here, in a way) show me what the blueprints would look like?
    Any help, in part or full, is *greatly* appreciated.
    Even if it's just to point me to a tutorial on the process.
    Thanks!

  2. #2
    0
    Use the getActorTransform for one of your two actors and then setActorTransform on the other one using that.
    Also make sure to disable collision using setActorEnableCollision and disable movement using disableMovement on character movement in your characterBP

  3. #3
    0
    I am going to try to do what you've suggested above. It's already lead me to good tutorials I think...
    But first I want to say...
    Adeptus, thank you for the quick reply!
    I absolutely appreciate it.
    This already sort of makes sense to me, especially since I've found the components in ue4.
    Now to see if I can actually implement them correctly.

  4. #4
    0
    I can get this to work when it's just dealing with a skeletal mesh type actor, but when the actor is a 'character' it isn't working.
    I've tried installing the script in AIController blueprint and the NPC Character blueprint itself, neither is working.
    Basically, I am using the getActorTransform (from player controlled character) and setActorTransform (on NPC) like you suggested (which, again, worked on a pure skeletal mesh)... I am using a straight up transform (orange) as the variable.
    Even when I cut out all other actions, the transform isn't working. Am I trying to put the script in the wrong spot or is there something else I have to do because the object I am trying to transform is an AI NPC Character with a controller etc?
    Note: responses from me may be delayed several hours as I will have to wait until after I work to do anything more here. Thanks for your time!

  5. #5
    0
    Attachment 148874
    This is what I've got so far, just for reference.

  6. #6
    0
    I did do the set on the player character while leaving the NPC where he stands. There must be stuff to also disable movement on an AI controlled character.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •