Is there an easier way to make all the particles point to the center of the SDF?


more issues trying to align along normals using SDF Gradient

Fixed axis?

What @Qriva suggested should be working. By default, the Set Position Shape node “write” the Direction attribute. So you can use it in the Orient block. Since Unity 6, The Set Position Shape block can also apply the Shape orientation to your Axis Attributes.

By doing so, the block will write the AxisX, AxisY, AxisZ attributes needed for a proper orientation.
And you won’t even need an orient block.

Have a lovely day.

2 Likes

I think it’s worth to mention it produces different results if I am not wrong.
Sampler uses world up as Y axis according to the debug info and this is different for orient block where it’s camera/view up, so particles will not be facing the camera in Axes mode without orient.
This can be obviously desired, but it’s different.

In addition particles would not need to hold data for all axes (9 floats) and read them from buffer in output. Unless the particle buffer always holds AxisX, AxisY, AxisZ, but I assume not used data is stripped.

1 Like