|
Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
|
09-10-2007 22:37
Ok, I'm trying to filter throught he forums and the wikki, but I'm losing the concept on how to direct a aprticle stream without targeting something. I realise how to use particle emission speeds, vectors, etc. What I am having trouble with is having a particle emitting object, attached to a person - always pointing the stream forward. No matter what I try it seems that the stream always stays true to the original vector given. So if you're facing the "Y" axis and you set it to stream outward that direction.. great. you turn to your right.. well now the stream is trailing out of your left arm!  I realy don't want to target anyone with a sensor. This is to be used for a 'nifty' purpose... We designed built and entered a new Transformer into a contest, and while waiting for the results, I've made a mock-pulse-cannon for it's arm, and if we are selected to appear for judging, you have to 'perform' for the judges. I have everything working now but this... Transformation, headlights and tail lights, physics engine for the person wearing the car / autobot, a physics engine for someone else to sit / combine sit with the car so someone else can drive the car, now I just need to get THIS one last thing working... Wondering if perhaps I used a cube instead of a sphere if there is a way to tell a particle stream to only emit from one side of the prim outward? Either way, sorry to keep bugging you all about this one, but I'm truly stumped on this one. Probably simple, but I've tried even going so far as to use routines for calculating if/else statements to quantify where the object is in relation to each particular axis so as to adjust how to rotate using llSetRot Hoep someone can give me a hand here.. it would be much appreciated. If you're having trouble pictring what I'm talking about.. here: http://www.youtube.com/watch?v=_beHhHm9x-YThat is the link to the video... just look at her left forearm, imagine the white, top forarm brace lifting up slightly, then sliding back to reveal a nifty looking pulse-cannon. That's it, I just need to put one of my particle objects back in there, and find a way it will follow an outward track with the wepon
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
09-11-2007 03:18
I have no idea. I have weapons which fire out of prims and they remain true to the direction the prim points in, no matter which direction I am facing, or which direction the prim is facing.
Perhaps if you posted some code, maybe we could help you more directly?
|
|
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
|
09-11-2007 04:49
If I am understanding you correctly... The flag you are interested in is PSYS_PART_FOLLOW_SRC_MASK which is passed to PSYS_PART_FLAGS with a decimal value of '16' or a hexadecimal value of '0x010'. For example, build a hand-held cylinder, script it to make the following simple llParticleSystem() call and then wear it in your hand. You will see that it behaves exactly as you have described, and are trying to overcome. The problem here is that PSYS_PART_FLAGS = ZERO and therefore PSYS_PART_FOLLOW_SRC_MASK has not been set. From: someone llParticleSystem([ PSYS_PART_FLAGS, 0, PSYS_SRC_PATTERN, 4, PSYS_PART_START_ALPHA, 1.00, PSYS_PART_END_ALPHA, 0.00, PSYS_PART_START_COLOR, <1.00,0.00,1.00>, PSYS_PART_END_COLOR, <1.00,1.00,0.00>, PSYS_PART_START_SCALE, <0.05,0.05,0.00>, PSYS_PART_END_SCALE, <0.05,0.05,0.00>, PSYS_PART_MAX_AGE, 3.50, PSYS_SRC_MAX_AGE, 0.00, PSYS_SRC_ACCEL, <0.00,0.00,0.00>, PSYS_SRC_ANGLE_BEGIN, 0.00, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_BURST_PART_COUNT, 20, PSYS_SRC_BURST_RADIUS, 0.00, PSYS_SRC_BURST_RATE, 0.10, PSYS_SRC_BURST_SPEED_MIN, 7.50, PSYS_SRC_BURST_SPEED_MAX, 7.50, PSYS_SRC_OMEGA, <0.00,0.00,0.00>, PSYS_SRC_TEXTURE, "a96ecd50-96e1-28b4-51ec-96b3112210c0" ]);
Now edit the script so that PSYS_PART_FLAGS is passed the value of '16' (ie: you are now setting the PSYS_PART_FOLLOW_SRC_MASK flag). The particles now firmly emit in the direction that the cylinder is facing (ofc, you may have to change the cylinder rotation to suit). As the AV walks around, the particles continue to emit in the direction that the AV is walking. Now, ofc, in this example, as the prim is hand-held, the emmision also is subject to a slight up-down movement, as the AV swings her arms whilst walking. But nevertheless, the principle is shown that the particles continue to emit in the same forward direction. Whilst the AV is standing still, no such up-down movement is generated & the particles emit horizontally-forwards in the same direction that the AV is facing, regardless of which direction that happens to be. Hope this helps somewhat. 
|
|
Haplo Voss
Registered User
Join date: 18 Nov 2006
Posts: 137
|
09-13-2007 06:11
That's EXACTLY what I needed (sorry in the middle of a move... haven't been on much) The animation involved with the clinching o f the fist and prim-expansion of the weapon, locks the bot into position, so it's entirely for show, and therefore the drift won't be a problem, and even when we get the walk included.. that's no biggie.. just for show... lol At this point, it's no problem anyway, we didn't make the finals. Still going to implement because we aren't going to let it keep us down, but personally I kind of feel like it was a bit of a sham. No disrespect to the creators themselves... but for our Classy ... a 56 corvette with tons of features and abilities to get beaten by a transforming trash-can... I'm a bit skeptical  Thanks again all! I'll be posting a link when she's all done for everyone to take a gander if you'd like. Take care, Hap
|