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


          This one doesn't work for some reason: https://github.com/stefanseibert/RuntimeMeshComponent

          Build it with this one, this WORKS with 4.23.1: https://github.com/Koderz/RuntimeMes...ent/tree/v4dev

          I made the same mistake until I found Version 4(the second link) the older one won't compile for me for some reason, I found a link to Version 4 on the Discord for RMC.

          https://discord.gg/KGvBBTv

          Comment


            Is there any way (in blueprint) to obtain vertex data for a given mesh section index? I want to use Update Mesh Section to update a vertex relative to its current position. So far I've been keeping all this data in a separate array of vertices but if I could simply grab it from the section it would simplify things.

            Comment


              Originally posted by MaximeDupart View Post
              There's clearly a shading issue with RMC on 4.20 right now. Comparison with ProceduralMeshComponent :

              Is there any difference between using PMC and RMC now?

              Comment

              Working...
              X