Announcement

Collapse
No announcement yet.

How to get actor location from another blueprint

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

    How to get actor location from another blueprint

    I cannot found with any search how to resolved my problem.

    I have in my another blueprint class Scene component with name Point.

    How can I get WorldLocation from another class?

    I want to get Point location because Scene component I need for my Weapon.

    Thanks.



    Attached Files

    #2
    Before casting to WeaponGun, you'll want a reference to the weapon actor (to connect to the grey Object input in cast node). If the weapon has not been spawned yet, you can use the Spawn Actor from Class node to spawn a weapon and store it as a variable in your character.

    Click image for larger version

Name:	weaponspawn.jpg
Views:	1
Size:	389.0 KB
ID:	1672302

    You can then use this variable to cast to WeaponGun and it should work.
    NEW: Tower Defense Starter Kit (v2.10) | Proximity Mine Launcher [inspired by Hard Reset] | Grid Creation Systems (v1.2 WIP)

    Comment


      #3
      Yes you have right!.

      Only issue is why no use correct location.

      I need location where is located my Scene component. Check pictures.

      Where can be problem?
      Attached Files

      Comment


        #4
        It could be due to the rotation values of Point component. Are they all set to 0.0?

        Also, try using Get Right Vector instead of Get Forward Vector before multiplying by 10000, because the Forward (X/Red) direction for the Point is facing the left of the weapon
        NEW: Tower Defense Starter Kit (v2.10) | Proximity Mine Launcher [inspired by Hard Reset] | Grid Creation Systems (v1.2 WIP)

        Comment


          #5
          Thanks very much. Right Vector works!

          Comment

          Working...
          X