Trap #2

The Pressplate and the Block Thrower

In Trap #1 we used gravity to do our dirty work. Once the latch was released, the Spikey bar just fell on its own.
Here I didn't want the killing object to just fall... I wanted it to be "Spring-Loaded" and fly sideways... and for that we use the "geomonly" Linear Forcefields I mentioned earlier.

It's a Trap!

Again the mechanism here is quite simple, but took a bit a tweaking to get right.
View Trap Setup I have reduced the size of forces in the image, for clarity

The killer block starts inside Forcefield #1, and is held in place by the latch.
The killer block is just a normal rectangle, with an image and tagged as deadly.
Note: In the final level the wall graphic is set to depth=1 so that it hides the block, I changed it here so you could see it.

The latch and the pressplate are parts of the same compgeom object, so that they move together, and the compogeom is hinged. The part of the floor image which moves, is applied to this compgeom object, and I cut out that bit from the "background".

Even though the pressplate is bigger than the latch, the latch is actually much heavier. This is needed to ensure that the latch stays in place, even through the killer block is pushing on it, and to stop the pressplate just falling on its own and releasing the block without the player touching it.
The Endstop holds the pressplate in place, without it the latch is heavy enough to lift the pressplate out of the floor.

I balanced it so that the whole trap is "lightly weighted".. so that even a single Goo would set it off.

View Trap Release
Goo steps on..the pressplate drops, the compgeom rotates and the latch lifts upwards.

Forcefield #1 pushes the block to the right and into Forcefield #2.. which really WANGS it.
You'll notice that ForceField #2 is in the shaft... but it's set to "geomonly=true" so won't affect the goos if they go into it.
Both fields have an upward component to lift the block a bit, and get the firing angle just right.

Notes:
Originally I had one large force field, but I found that it also pushed on the latch.. and could trigger the trap on it's own. So I split the field into 2, and left a gap where the latch is.

Materials:
When the killer block hits the far wall it's going fast. I found using the default material "rock".. made it bounce off to much. The killer block is now "fruit" and the back wall is "swamp". This really deadens the bounce nicely, so even though the block is going fast, it only bounces just enough to land on the pressplate.

In v0.3 I put the Endstop at an angle and changed its material to "ice", because sometimes the killer block would get caught on it. Now the block almost always slides off and kills any remaining Goos... Evil