Page 1 of 1

spawning a ceg effect in a unit.

Posted: 04 Dec 2012, 06:19
by smoth

Code: Select all

local x,y,z,dx,dy,dz	= Spring.GetUnitPiecePosDir(explosionPiece)
produces 6 nil values

Code: Select all

			local x,y,z				= Spring.GetUnitPiecePosition (unitID, explosionPiece)
			local dx,dy,dz 			= Spring.GetUnitPieceDirection (unitID, explosionPiece)
			
			Spring.Echo(x, y, z, dx, dy, dz)
			Spring.SpawnCEG("verticalbomb", x,y,z, dx, dy, dz)
results in values but unitspace values, not world space. The spawnceg call does nothing.

what am I missing here?

Re: spawning a ceg effect in a unit.

Posted: 04 Dec 2012, 06:52
by knorke
what am I missing here?
parameter in GetUnitPiecePosDir

Re: spawning a ceg effect in a unit.

Posted: 04 Dec 2012, 07:08
by smoth
ah, that is what I did incorrect! thanks, I didn't see it for some reason