UE5.1 Foliage have offset pivot point when selected

Hey all,
I’ve been struggling with this issue for awhile now and can’t seem to find a solution. When the foliage gets brushed in, selecting the foliage using the Select Foliage tool doesn’t center the pivot point on the selected object. Instead the pivot point is a good distance away. Here is an example:

Does anyone know what could be going on or if this is even fixable?

7 Likes

If I had to guess, that is probably the center of the hierarchal instance. The foliage tool splits meshes into grids of instanced meshes. Is the behavior the same of you get up close to the mesh?

I was thinking that could be the case but selecting foliage objects near each other results in varying pivot points, all of which aren’t the pivot of the hierarchal instance.

Very weird. And this is happening while you’re in the foliage editing mode?

Yah, its definitely a weird one. Yes, this is happening in foliage editor mode.

If the foliage actor is part of a blueprint, make sure that the static mesh origin is properly centered in the BP. Also check to make sure any WPO effects in the material are set up properly and aren’t pushing the mesh away from it’s origin.

Thanks for your help but it looks like enabling nanite on a static mesh thats being used as a foliage object breaks the folaige selection tool:

Looks like there are others who were having issues as well. Didn’t know it was a nanite issue so wasn’t even able to find these posts with my initial search:

1 Like

Good find, good to know. I’ve yet to use Nanite on foliage.

1 Like

If anyone else is having a similar issue, I found a workaround for now. When going to edit the foliage use console command “r.Nanite 0” which will disable nanite for all objects, then use “r.Nanite 1” to enable nanite again.

3 Likes

Helped a lot, thanks :slight_smile:

Nanite was the issue for me as well. I was trying to dynamically scale my foliage in a material, but the ObjectPosition node gives the nanite group’s position, not the individual foliage instance. It was working for other foliage, since I forgot I’d experimentally turned nanite on for this foliage type’s mesh :see_no_evil:

Here’s my shader graph, for anyone curious

In my case, I simply disabled nanite, since I wasn’t using it intentionally. If there’s a way to get this form of material-based scaling to work with nanite foliage, I don’t know what it is.

Use the node Component Pivot Point, or take a vector (0,0,0) and transform it from instance/particle space to world space and replace he object position node with it.

1 Like