Positioning relative to an actor's side? (particle emitter offset)
supafly129
Member Posts: 454
I have an actor and I want it to spew particles at the tip, regardless of it's rotation. For example, if I had a torch with fire particles coming out of the tip of the flame, when I rotate it I don't want the fire spewing out from the side (attached is an example). The problem is that when I rotate the actor, the particles continue to emit from the same position and it just looks "off".
Is there a simple formula for this without having to customize the particle emitter offset for every actor rotation?
Comments
Emitter offset:
X 33 *cos( self.Rotation +random(45,135))
Y 33 *sin( self.Rotation + random(45,135))
. . . . . .
The random range here is really an angular range (a 90° sweep), if you wanted the random range to be 'flat' (as it is by default in the particle emitter) then you could just parent a child actor to your main actor and place the emitter on that, the child actor would handle the job of always staying in the same place regardless of rotation - and also hold the particle emitter.
Hope that makes sense.
@Socks you shall now be known as GS Jesus. Works perfectly, thanks as always!!
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download
@Socks i actually tried this formula again for a new actor and it doesn't seem to be working. You can see in this new file what I'm trying to achieve..i'm assuming since the direction is now "0" instead of "90" that the formula needs to be changed, but I can't seem to figure this one out after playing with it. Any ideas?
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download
It's working just fine, you can't honestly hope to change the direction (orientation) of your actor, something I'd originally taken into account in the formula, and then apply the same formula to the newly oriented actor and say 'the formula' is 'not working' !
33*cos( self.Rotation + random(-45,45))
33*sin( self.Rotation + random(-45,45))
Hey guys! Any idea how to get this to work when the actor is rectangular (not square)? Or if the actor is square but the visible image isn't centred in the actor (the actor is not symmetrical)?