Direction of grass based on the direction of the object.

I have a script to create grass, but my objects have random rotation, i don’t know how to calculate the trajectory of grass based on the direction of the object.

2621763--184122--Grass.jpg

What is the object? a parent that contains the grass? A character that moves over the grass?

You can always use grass.transform.rotation = otherThing.transform.rotation. If you need a rotation offset, then use Eulers and add an offset on the appropriate axis (if the grass should actually be 90 degrees different from the other thing, for instance).

The object isn’t parent of grass, the grass is a detail of Terrain, my objective is create a grass in straight line based on the direction of the object.