0 like 0 dislike
17 views
The given solution for non-uniformally scaled sprites (ensure the SizeField is a float2) seems to stop working as soon as a sprite's Billboarding mode is set to any of the "Velocity Align" options.

How can I have non-uniformally scaled sprites that are still velocity-aligned? Before you ask, I do not want my sprites to scale relative to velocity (I would prefer to maintain control over my proportions).

Can this be done?

-J
asked by SevenCubed (200 points)
I'm sorry, I've been unclear. Again, I don't want velocity to factor in here.

What I'm looking for is to have particles orient in the direction of their velocity _and_ be able to independently control their X and Y scale.

In this instance, my Billboard mode is set to VelocitySpheroidalAlign, my AxisScale is set to 0 (I don't want to change shape relative to velocity), and my Size is a float2 (1,0.1). It's rendering squares with a size of 1.

The expected behaviour is that it would render rectangles with a size of (1,0.1), orienting the particle in the direction of motion. Are my assumptions incorrect?

-J

1 Answer

1 like 0 dislike

Hi,

The "Velocity*Aligned" billboarding modes are actually a misnomer inherited from old versions of popcorn.

You can specify any axis, not just velocity.

So, to do what you want, just create a new float3 particle field named "StretchAxis" or whatever, add an evolve script after whatever evolvers modify the particle velocity (for example, the physics evolver), and do:

float myStretchFactor = 0.1234;
StretchAxis = safe_normalize(Velocity) * myStretchFactor;

And that should do the trick.

Cheers,

answered by Julien (32.2k points)
...