Announcement

Collapse
No announcement yet.

Set world location of an attached component?

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

    Set world location of an attached component?

    Anyone know how to do this?

    #2
    Maybe with SetTranslation?

    Comment


      #3
      SetTranslation is relative to the attached actor. I know i can calculate the diff, but wondered if there was native support for this.

      Comment


        #4

        https://docs.unrealengine.com/en-US/...ion/index.html

        Comment


          #5
          Hey bro, you know how to make that work in UDK?
          Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

          Comment


            #6
            Originally posted by Nathaniel3W View Post

            Hey bro, you know how to make that work in UDK?
            I believe it would be as simple as:

            Code:
            function SetComponentWorldLocation(PrimitiveComponent component, vector worldLoc)
            {
                local vector transformedLoc;
                transformedLoc = TransformVectorByRotation(Rotation, worldLoc) + Location;
                component.SetTranslation(transformedLoc);
            }
            Haven't tested this though.

            Comment

            Working...
            X