Page 1 of 1

True piece fall.

Posted: 04 Sep 2009, 22:04
by smoth
We have explode piecename which causes a piece to explode off in an arc.. but if I want a unit to simply drop a piece and it fall off I have no way of doing that..

so request...

fall(piecename) or something like that where the piece in question drops off and falls vertically.

Re: True piece fall.

Posted: 04 Sep 2009, 23:11
by Neddie
This piece would fall to the ground at an arbitrary or set speed? Would it detect and leave itself upon the ground or explode on impact, leaving nothing?

Re: True piece fall.

Posted: 04 Sep 2009, 23:15
by smoth
dunno..

I would assume fall at gravity like other pieces but lets see..

fall(piecename)
-basic functionality, all I really need falls and normal gravity disappears after leaving level, prettu nice..

or


fall (gravityvector) (piecename) (smoke|shatter|explode on impact)
as opposed to explode, would be nice to.

Re: True piece fall.

Posted: 04 Sep 2009, 23:56
by Super Mario
It it like in halo wars that when one of the vehicles explodes it creates small debris with physics? Is that the idea?

Re: True piece fall.

Posted: 05 Sep 2009, 00:05
by Argh
+1

Already asked for the ability to change to the impulse given to a Piece elsewhere. We can control everything else.

Re: True piece fall.

Posted: 05 Sep 2009, 01:31
by smoth
how do you mean impulse?

Re: True piece fall.

Posted: 05 Sep 2009, 04:03
by Argh
When Pieces are subjected to a FALL event, a certain amount of impulse is applied- i.e., there's an explosion there, that we can't control, that behaves exactly like the impulse from a regular explosion does. You know, that whole bouncing-pieces stuff?

I got Pieces to fall pretty much straight down otherwise, but they bounce upwards first, which looks really lame. I hadn't thought of it earlier, but maybe an absurdly-high Mass value could solve that.

Re: True piece fall.

Posted: 05 Sep 2009, 04:07
by smoth
I am not asking for explosion or controll on explosion. just a fall, as in I drop a rock it falls.

Re: True piece fall.

Posted: 05 Sep 2009, 04:29
by Argh
I'm saying, that we can do that, with some caveats. Hold on, I'll go check the mass thing, and if it works, I'll post some source.

Re: True piece fall.

Posted: 05 Sep 2009, 04:34
by thesleepless
falls to ground, leaves debris, can be reclaimed for metal?

Re: True piece fall.

Posted: 05 Sep 2009, 04:45
by Argh
Ah... got it!

Hold on, I'll post some code for Pieces that will just... fall.

Here ya go. Should be pretty easy to customize and make variations that are cool. Just be aware that the vector provided for spin also determines the initial amount of rotation applied (i.e., it's instant), so you want to keep it small, for big things.