Game Development Community

SgDropDecal wont bloody drop

by Ted Lilljegren · in Technical Issues · 04/17/2008 (2:27 pm) · 4 replies

Adding to the allready extensive tastelessness to "my game", i thought it would be cool if the player sprayed an improportional amount of blood when they took damage. For this i use a particle emitter that works pretty well, but also i create a sgDecalProjector under the victims feet. It looks like this:

%puddle = new sgDecalProjector()
{

dataBlock = "bloodPuddle1";
position = %defender.getPosition();
rotation = "1 0 0 0";
scale = "1 1 1";
canSaveDynamicFields = "1";
};

MissionCleanup.add(%puddle);

Although for some reason, this does not work, the console log tells me that: "no drop object was found".

Adding to my frustration, sgDecalProjectors seem entirely undocumented. Anyone have any idea of what went wrong here?

#1
04/23/2008 (2:34 pm)
Would someone kindly take a look at this? I am pretty sure its really easy, and it should be easy to reproduce the result.

Edit: i would also like to add that the datablock is valid.
#2
04/25/2008 (1:26 pm)
Okay i found out what was wrong now. When i used the getPosition method on the object, i got the xyz vector from the feet. The feet are actually hovering some inches above ground and for the sgDecalProjector to... project, its bounding box have to intersect the ground. Also i just want to say the blood looks pretty cool now =)
#3
04/25/2008 (3:26 pm)
Sure, lets see some pics.
#4
04/27/2008 (3:16 pm)
Allright ill try and add some pics tomorow. But its nothing spectacular, the blood looking "pretty cool" was strictly an inobjective statement from me, who of course thinks it looks a lot cooler than a third person, because i am the one responsible for magically making the blood apear on the computer screen =)

Stay tuned for pics.