Announcement

Collapse
No announcement yet.

Simply attaching something in front of player no matter where player looks

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Simply attaching something in front of player no matter where player looks

    Hello! I want to attach an object to the player so that no matter where the player looks it's always floating a certain distance away in front of the player. I've tried creating a new Actor Pawn blueprint with the object in it, but when the player moves the object does not follow. I've tried creating a new actor with a camera and the object, but although the player possesses this camera at game start there are no movement controls (WASD).

    I simply want to be able to move anywhere in space and always have this object floating in front of me. I've been searching for the past couple of days and I feel like this should be simple and I'm overlooking something. Could someone point me in the right direction? Thank you!

    #2
    I would do this:

    Attach a scene component in the place you want, relative to the pawn, probably in front of the player camera..
    For the component, set the world location to the scene component.
    Attach the 'held' component to the scene component.

    The attachment to the actor should keep the 'held' actor in view.

    Comment


      #3
      Originally posted by Skifree View Post
      I would do this:

      Attach a scene component in the place you want, relative to the pawn, probably in front of the player camera..
      For the component, set the world location to the scene component.
      Attach the 'held' component to the scene component.

      The attachment to the actor should keep the 'held' actor in view.
      Thanks! I'm not sure if this works with my scene though... I'm using the blank template, so the playerstart has no player camera component. It seems that the playerstart only tells the game where to start the player, and then when the user plays the game and moves around, it leaves the player start behind.

      I tried searching to see what's the default player camera in the blank template, but I can't find anything that explains this (or it is way above my head).

      Comment


        #4
        Is this correct:
        You need WASD controlled pawn with some object in front of camera which will move together with this pawn?

        Comment

        Working...
        X