-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add velocity inheritance for particle effects #3691
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah this an extremely useful PR and will substantially help with improving the look of particle-based effects. SourceOrigin
make sense and everything else looks good, but I'll also tag @asarium.
@@ -179,6 +185,10 @@ class GenericShapeEffect : public ParticleEffect { | |||
saw_deprecated_effect_location = true; | |||
} | |||
|
|||
if (optional_string("+Velocity Inherit:")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me, this name seems a bit weird. It seems to indicate that it is a simple boolean value but instead is a factor on the inherited velocity.
Maybe something like +Velocity Factor:
would be more appropriate? Also, you could make use of a random range here to allow for some variability if desired by the modder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parent velocity factor:
maybe? I do want to make sure it is known that it is inherited in some way, rather than operating on the regular $Velocity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you changed it to +Parent Velocity Factor:
, and that does make it a bit more immediately clear IMO.
Uses the previously unused
GetVelocity()
function to return, not only the particle or object's velocity, but also a plain vector set by the initial caller of the particle source set up, such as the velocity of a weapon when it detonates. Particle Effects can then inherit a specified amount of this velocity when spawned (default 0).The velocity of the source is on the
SourceOrigin
which a little awkward perhaps, but I'd be open to a better place for it.