General Question moving exhuaust streams

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,056
Reaction score
1,756
Points
203
Location
Langendernbach
Ok. Will do. Thanks.

So What if I want the exhaust stream not to have an offset. That it matches the location of the thruster. Couldn't use the same location value?

No. the position of the exhaust is calculated as: Position of the thruster PLUS the offset to the exhaust stream.

Refer to the API Reference, please.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
7,609
Reaction score
1,754
Points
203
Location
Dallas, TX
Will do when I get home.
Thanks

---------- Post added 04-22-15 at 05:25 AM ---------- Previous post was 04-21-15 at 08:05 AM ----------

Ok. I have looked at addexhaust:
8.51.3.298 PSTREAM_HANDLE VESSEL::AddExhaustStream (THRUSTER_HANDLE th, constVECTOR3&pos,PARTICLESTREAMSPEC∗pss= 0)const Adds an exhaust particle stream to a vessel.
Parameters: th thruster handle pos particle emission reference point pss particle stream specification
Returns: Particle stream handle Note: This version allows to pass an explicit particle emission reference position, independent of the engine reference point. If the user has disabled particle streams in the launchpad dialog, this function will return NULL. The module must be able to cope with this case.

Code:
//// LOX vent streams
	th_vapour = CreateThruster(vapourlocation[0], _V(1, 0, 0), PB_MAXHOVERTH, ph_vernier, PB_ISP);
	AddExhaustStream(th_vapour, VAPORLOCATION + _V(0, .1, 0), &contrail_vapour);//
	//AddExhaustStream (th_srb[0], OFS_LAUNCH_RIGHTSRB+_V(0,0,/*-30*/-50), &srb_contrail);

h.
Code:
const VECTOR3 VAPORLOCATION = { -16.88219, 6.607, -3.882331 };

But the exhaust stream doesn't follow the thruster.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,056
Reaction score
1,756
Points
203
Location
Langendernbach
Then the position of the exhaust in that version of AddExhaustStream is independent of the thruster position.

But there are other versions of that functions.
 

orb

O-F Administrator,
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
other versions?
Code:
PSTREAM_HANDLE AddExhaustStream (THRUSTER_HANDLE th, PARTICLESTREAMSPEC *pss = 0) const;

or even:

PSTREAM_HANDLE AddParticleStream (PARTICLESTREAMSPEC *pss, const VECTOR3 &pos, const VECTOR3 &dir, double *lvl) const;
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
7,609
Reaction score
1,754
Points
203
Location
Dallas, TX
Thanks. But I wonder why the thruster moves but the exhaust doesn't?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,056
Reaction score
1,756
Points
203
Location
Langendernbach
Thanks. But I wonder why the thruster moves but the exhaust doesn't?

Because of

Note: This version allows to pass an explicit particle emission reference position, independent of the engine reference point.

It doesn't move with the thruster and can't be moved at all.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
7,609
Reaction score
1,754
Points
203
Location
Dallas, TX
Oh. So maybe:
Code:
PSTREAM_HANDLE AddParticleStream (PARTICLESTREAMSPEC *pss, const VECTOR3 &pos, const VECTOR3 &dir, double *lvl) const;

With the location the same as thruster
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,056
Reaction score
1,756
Points
203
Location
Langendernbach
Oh. So maybe:
Code:
PSTREAM_HANDLE AddParticleStream (PARTICLESTREAMSPEC *pss, const VECTOR3 &pos, const VECTOR3 &dir, double *lvl) const;
With the location the same as thruster

No.

Code:
 PSTREAM_HANDLE AddExhaustStream (THRUSTER_HANDLE th, PARTICLESTREAMSPEC *pss = 0) const;
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
7,609
Reaction score
1,754
Points
203
Location
Dallas, TX
So that one will place the exhuast stream where the thruster is?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
7,609
Reaction score
1,754
Points
203
Location
Dallas, TX
OK Thanks. I could see where you want the exhaust to different than the thruster. But in that case the thruster isn't moving.

---------- Post added at 05:33 PM ---------- Previous post was at 09:49 AM ----------

I did this but the exhaust doesn't move with the thruster.
Code:
	th_vapour = CreateThruster(vapourlocation[0], _V(1, 0, 0), PB_MAXHOVERTH, ph_vernier, PB_ISP);
	//PSTREAM_HANLE AddExhaustStream(th_vapour, vapourlocation[0] + _V(0, .1, 0), &contrail_vapour);//
	PSTREAM_HANDLE ph;
	ph = AddExhaustStream(th_vapour, _V(0,0,0), &contrail_vapour);
 

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,870
Reaction score
1
Points
0
Location
San Diego
You're still trying to define them separately.

If you set the thruster location to "const VAPORLOCATION" and then set the particle stream location to "const VAPORLOCATION" the partical stream will stay at "const VAPORLOCATION" even if you move the thruster.

What you need to do is set the position of the thruster and then tie the particle stream to that truster's location NOT "const VAPORLOCATION".

IE
Code:
th_vapor = CreateThruster (VAPORLOCATIONSTARTINGPOINT, X_AXIS, 0.01, ph);
[B][I][U]AddExhaustStream (th_vapor, &pspec_vapor);[/U][/I][/B]

Seriously, just read the instructions, or in this case the api doc.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
7,609
Reaction score
1,754
Points
203
Location
Dallas, TX
Thanks.
Code:
th_vapour = CreateThruster(vapourlocation[0], _V(1, 0, 0), 0.01, ph_vernier);
	AddExhaustStream(th_vapour, &contrail_vapour);

Now to add another for the other arm. Both will thrust if a vessel is near the pad. If thrust on the vessel is applied no exhaust on tower
 
Top