Elijah Hutchence
Maker of the Blue Falcon
Join date: 7 Oct 2005
Posts: 14
|
10-25-2005 02:05
I've been trying to use llGetRot() and some combinations of sine and cosine to get my particles to emit at the angle of the emitter object, but it won't work. Namely I want to have engines on the back of a car that shoot fire. Everything look fine I just can't get the fire to match the object's rotation.
Basically I set the PSYS_SRC_ACCEL to an x and y amount based on the rotation (Z) angle. Say I have an angle of 40 degrees, I am then projecting the particles <3*llSin(40),3*llCos(40),0> This basically pretends the C side of the triangle is of length 3, using basic trig functions.
So why will it not project in the correct directions, and should I be using llGetRot() in a vehicle, and does it return a radian value like I need?
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-25-2005 02:15
the particles' acceleration is global, it doesn't turn with the vehicle. Use burst speed instead, and a combination of ANGLE_BEGIN and ANGLE_END, to make the particles go out from a vehicle's prim's end.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Elijah Hutchence
Maker of the Blue Falcon
Join date: 7 Oct 2005
Posts: 14
|
10-25-2005 02:15
Nevermind, I figured it out, a cheating way.
push = llRot2Fwd(llGetRot());
Yay, now I don't have to use trig.
|
Elijah Hutchence
Maker of the Blue Falcon
Join date: 7 Oct 2005
Posts: 14
|
10-25-2005 02:17
From: Jesrad Seraph the particles' acceleration is global, it doesn't turn with the vehicle. Use burst speed instead, and a combination of ANGLE_BEGIN and ANGLE_END, to make the particles go out from a vehicle's prim's end. Okay, I assume you mean PSYS_SRC_BURST_SPEED_MIN and PSYS_SRC_BURST_SPEED_MAX? Where do I find ANGLE_BEGIN and ANGLE_END? Do you mean PSYS_SRC_INNERANGLE and PSYS_SRC_OUTERANGLE? Why can't I do it the way I listed? That works with a block.
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-25-2005 02:21
Drive your block in a circle and you'll understand what I mean by "ACCEL is global" 
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Elijah Hutchence
Maker of the Blue Falcon
Join date: 7 Oct 2005
Posts: 14
|
10-25-2005 02:32
Well it seems to work, just slowly and I can't make it update its angle any faster. Do you have any links to sample code or tutorials on how to do it your way?
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-25-2005 04:07
Someone had the exact smae issue yesterday: /54/0f/67025/1.html
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Elijah Hutchence
Maker of the Blue Falcon
Join date: 7 Oct 2005
Posts: 14
|
10-25-2005 15:03
Beautiful. Thank you very much. 
|