Announcement

Collapse
No announcement yet.

How to get the location of a Static mesh?

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

    How to get the location of a Static mesh?

    I have a Turret aiming at a (Mesh,Object) in the world. and in order to finish my node set up i need to get the location of my mesh so that the turret can target it.

    I know to get the location for a Player, The nodes are ( Get Player Pawn ) And ( Get Actor Location ) but i can't seem to find one for a Static Mesh?

    So i Guess my Question is.. Is There a node for Mesh Location? or is that not possible?

    Any input or know how on this matter would be greatly Appreciated.

    #2
    It is possible and not possible (or rather inefficient).

    You can get all actors of class (and select static mesh), but you will exactly get that: list of all static meshes which on decent map will be around 2000 or so.
    So you should rather rethink why you need location of static mesh for your turret.

    Comment


      #3
      You should be able to do this without targetting a mesh - target an actor instead

      However, you can do this if you want by getting the player pawn, Cast the player pawn to your pawn class, then drag off the blue to get mesh (in this case the mesh is called Sphere), like so:

      You can also right click the Cast and click Convert to Pure Cast and you won't need the execution line. I just kept it like this to show it simply.

      Click image for larger version

Name:	pawn.JPG
Views:	1
Size:	30.4 KB
ID:	1101289

      Comment


        #4
        Here are some screenshots of what im talking about...

        Click image for larger version

Name:	Capture4.JPG
Views:	1
Size:	126.3 KB
ID:	1101321
        Click image for larger version

Name:	Capture3.JPG
Views:	2
Size:	35.0 KB
ID:	1101322

        The sphere represents the Turret and the Box is the Mesh. i've been able to get the reference of the Mesh but only in the Level Blueprint Editor. But i can't seem to be able to move it to my Turret Blueprint
        i've tried Copy&Paste but it says (Node Unknown)

        Comment


          #5
          Turn off context sensitivity when selecting what BP node to use.

          Comment

          Working...
          X