Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Procedural Mesh in wrong location

I cannot work out if this is a bug, or if I'm missing something really obvious.

I have an actor that has six Scene Components arranged in a hexagonal formation, one other Scene Component in the centre, and a Procedural Mesh Component which uses those 7 points to draw a simple hexagonal mesh.

When I place my actor at the world origin (0,0,0) this works perfectly. However, when I place my actor any distance away from the origin, the Procedural Mesh Component seems to be inheriting that transform twice. So for example, if I place the actor at (0,0,100), then the Procedural Mesh Component draws its mesh at (0,0,200). I am drawing spheres at the places where the Scene Components are, for debug purposes. This is what it looks like:

alt text

I am drawing spheres at the places where the Scene Components are, for debug purposes. It happens with rotation too. So if I rotate the actor -20 degrees, then the mesh appears -40 degrees rotated.

The strangest thing about this though, is that if I debug all the relevant transform information, it seems to be correct. I am doing this in C++, but have wired up a Blueprint function that reports the location of the actor, points, and procedural mesh. Here is an example output when the actor is at (0,0,100):

 Actor World Location: 0.0, 0.0, 100.0
 Procedural Mesh World Location: 0.0, 0.0, 100.0
 Point 0 World Location: 0.0, 0.0, 100.0
 Point 1 World Location: 0.0, 0.0, 200.0
 Point 2 World Location: 0.0, 86.602539, 150.000015
 Point 3 World Location: 0.0, 86.602547, 49.999977
 Point 4 World Location: 0.0, -0.000036, 0.000092
 Point 5 World Location: 0.0, -86.602547, 49.999977
 Point 6 World Location: 0.0, -86.602539, 150.0

This data is all correct. The actor, procedural mesh component, and first point (centre of the hexagon) are all at (0,0,100). The other point positions are also correct for drawing this hexagon. The point positions are debugged from the exact place that they are used to draw the mesh section. However, it is actually drawing the procedural mesh an additional 100 units higher up.

I've been pulling my hair out for a whole day now trying to figure this out, it just doesn't make sense. I can't see why the Procedural Mesh Component is inheriting the transform of the actor it's part of twice.

If I spawn an actor into the world which has a Procedural Mesh Component, and use that same point data to draw the mesh it's in the correct place. Why would it wrong if it's a component on the same actor?

Is this a bug? Or am I doing something wrong here?!

Product Version: UE 4.17
procmeshissue.jpg (190.6 kB)
more ▼

asked Oct 17 '17 at 07:12 AM in Bug Reports

avatar image

68 16 22 31

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

It seems like you have set the procedural mesh's actor relative location to (0,0,100), not the world location. Leave the mesh's location at (0,0,0), and only move its parent around.

more ▼

answered Jan 25 '18 at 09:21 PM

avatar image

1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question