Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Particle relativeoriginoffset ignored when particle effect is not a trail #251

Open
hemebond opened this issue Feb 11, 2025 · 2 comments
Open

Comments

@hemebond
Copy link
Contributor

hemebond commented Feb 11, 2025

relativeoriginoffset is supposed to offset the origin of a particle relative to the forward, right, and up directions of the velocity.

When using the pointparticles function, the origin is correctly updated with this relative offset, but is then overridden by this block:

if (!(drawastrail || definedastrail))
{
	trailpos[0] = lhrandom(originmins[0], originmaxs[0]);
	trailpos[1] = lhrandom(originmins[1], originmaxs[1]);
	trailpos[2] = lhrandom(originmins[2], originmaxs[2]);
}

This only takes into account the value of originoffset, which is based on the world axis.

@hemebond
Copy link
Contributor Author

I moved this code earlier and I don't yet see any issues:

if (drawastrail)
{
	VectorCopy(originmins, trailpos);
	trailstep = traillen / cnt;
}
else
{
	VectorCopy(center, trailpos);
	trailpos[0] = lhrandom(originmins[0], originmaxs[0]);
	trailpos[1] = lhrandom(originmins[1], originmaxs[1]);
	trailpos[2] = lhrandom(originmins[2], originmaxs[2]);
	trailstep = 0;
}

@Baker7
Copy link

Baker7 commented Feb 11, 2025

velocity is ignored on many of them too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants