Announcement

Collapse
No announcement yet.

Runtime Mesh Component

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

    Is there a way to get the vertex positions in world coordinates? Say I have a runtime mesh that has been moved and rotated and I would like to get the vertex positions so I can combine it with another mesh but keep it's location.

    Comment


      Originally posted by Mctittles View Post
      Is there a way to get the vertex positions in world coordinates? Say I have a runtime mesh that has been moved and rotated and I would like to get the vertex positions so I can combine it with another mesh but keep it's location.
      Ok I figured it out. Send the actor you want to merge with the transform of the actor you want to merge from. Loop through vertices and use TransformPosition on each one:

      Code:
      for (int32 vertCounter = 0; vertCounter < verticesSent.Num(); vertCounter++) {
                      const FVector WorldSpaceVertexLocation = transformSent.TransformPosition(verticesSent[vertCounter].Position);
                      vertices.Add(transformSent.TransformPosition(verticesSent[vertCounter].Position)-GetActorLocation());
                  }
      You might also need to subtract your current actors location (or the difference between the two actors). In my case "-GetActorLocation()".

      Comment


        Has anyone successfully built the plugin for 4.23.1 ? I tried it with the sources from https://github.com/stefanseibert/RuntimeMeshComponent but get an error when i use it as an engine plugin.

        Comment

        Working...
        X