#[SOLVED] orient particle to hero forward direction?
1 messages ยท Page 1 of 1 (latest)
Here's what it looks like without the proper orientation (i.e. the wrong behavior):
Does the cp already rotate with the model? I think there was an option for that (in lua)
Then is it a single particle? How does it currently work?
Does it spawn with an offset and is kept in place with lock to cp?
it's a parent particle which follows CP0 position and orientation
attached with PATTACH_OVERHEAD_FOLLOW
I think it might simply not be sending any orientation information to the particle system
yeah, that's exactly it, PATTACH_ABSORIGIN_FOLLOW solves it by actually providing orientation to the particle
correct, lock to CP on both translation and rotation
child particle just follows parent
Does that already solve it?
Or is overhead essential
It's not ideal, I wanted to use overhead's property of adjusting particle height based on hero size
but it's much better than nothing
You can also try to do something else
Provide the orientation as a new cp
Hmm, but I don't know if that actually works with follow ent... sending it on a loop doesnt seem practical. maybe scrap that thought
Should the particle actually be like close to the models head?
Because you could also provide the head attachment location as position
Ah true...
I'm actually testing OVERHEAD's functionality now and... it's actually pretty minor. I can live without it
difference is like 20-30 units
It won't look as nice for some heroes, but that's acceptable
yeah I thought it would make sure to always be above the model entirely, but that was just placebo
I think it looks fine ๐
thanks for the help :]
Barely did anything, np :)
oh
@prime burrow PATTACH_ABSORIGIN_FOLLOW locks into the origin of the model
how do I produce an offset that "spins" with model orientation?
example of undesired behavior:
this is using position modify offset random to set up the particle's offset from origin
Oh, I would solve it with a secondary CP.
- have the base CP (the one you currently use)
- create a second CP, that is based with the desired offset from the base. Use the set single CP as pre emission (this uses orientation)
- then emit your particle from the new cp and lock it to there
constrain distance to control point, with an offset and based off CP0, almost does it:
Constraint could also work, notice this:
- constraints are very expensive for computation
- if you set min and Max to same distance it does not "wobble"
constraints are very expensive for computation
sadge
If there the are just few of them it's no problem tho
it's really just 1
all I need is to adjust the golden model's yaw to be relative to CP0's normal instead of absolute
hmmmm
let's try your method first
Hope it works, can't test right now :/
that's your problem
overhead follow doesn't use hero rotation
Ahh, the new cp does not have the right orientation
You can just set the orientation of the other cp to the same
We're past that and back to abs origin :)
is the parent a blank particle?
you should not try to set rotation of the model itself directly, you should be setting the orientation of the parent
it is
hey there ya go
Yay ^^
[SOLVED] orient particle to hero forward direction?
I assume you set the position initializer to the same rotation setting
ya
It's just personal preference, but I really like solving stuff with pre emission ๐
eh..
at that point it's not a matter of preference, it's about what can and can't be affected throughout the lifetime of the particle
sometimes pre-emission only works on the first tick or whatever
but that depends on the thing you're changing during pre-emission, so it's context-senstive
this is now off-topic, but can I make the "wobble" from a distance constraint happen only on the xy plane?
since distance constraint is a sphere, probably not, unless you can somehow scale the scphere's z to be 0
I mean on a permanent particle or on the root it's irrelevant and back to preference (I think)
this would be super easy in any other engine ๐
or add something like a linear distance from ground constraint
Expensive but you could add 2 more constraints as planes that limit the . Top and bottom
you could also just code a custom delay yourself
idk it that's easier or not though
Btw, don't most pre emission fire every tick if not "only once" or what it's called is ticked?
I was under the impression that some do, some don't. depends on their function
eh... a bit too wobbly still, I'll give up on that aspect specifically
Btw you're solving with constraint or second cp now?
FWIW, it ends up looking very similar to the distance constraint
The dampen movement to cp or whatever it's called
Operator
It somehow works after constraints
hmm experimented with it a bit but not liking how it looks, will abandon the idea
thanks for all the help tho 

I think your particle is like this, its normal wont rotate with cp rotation
I init normal once in initializer
