Home    LittleBigPlanet 1 - PSP - Tearaway -Run Sackboy Run    LittleBigPlanet 1    [LBP1] Help! [Archive]
#1

Object Collision Detection schemes

Archive: 10 posts


Greetings,

Is there a way of implementing object collision detection WITHOUT the use of magnetic switches and keys?

For example, I keep looking at sound objects that have an On Impact setting and wondering if there is any way to tap into that, such as a sound switch: when X sound plays, a collision has occurred -> perform action Y.

I have the feeling that that answer is no, and I'll just have to bite the bullet and produce an overlapping magnetic switch arrangement that neatly encompasses my target object, with appropriate magnetic keys on the colliding objects, but I thought I might ask, just in case I've missed something.

Thanks,

-- Nanluin
2010-05-24 21:21:00

Author:
Nanluin
Posts: 98


magic keys is your only way my friend :/

.BOUNTY.
2010-05-24 21:25:00

Author:
howMUCHforBOUNTY
Posts: 623


There's a bit of a workaround, but I dunno if it'll help in your situation. You can rig an emitter to spit out a tiny invisible object with a mag key on it right next to the main object. If it runs into anything else, the emitter will be blocked and trigger the mag switch on the object. That's how the ground sensor on my mech works: when it's on or close to the ground, the emitter is blocked and the ground sensor is triggered.2010-05-24 21:50:00

Author:
Sehven
Posts: 2188


Sehver, loving the technique. I'll have to impliment it into a level of mine 2010-05-24 21:55:00

Author:
KablooieKablam
Posts: 364


There is likely to be some sort of impact switch coming in LBP2, especially to support arcade games like pinball. But until then, Sehven's on the money I reckon .2010-05-24 22:56:00

Author:
Holguin86
Posts: 875


Sehven's method is probably the best.

I do however, have a switch that you place inside a small hole that you cut inside an object, and when enough force hits it, it activates... It's just a bit gimmicky, since it activates when it moves zig-zaggily. (EX. A sackboy in a jetpack pulling it around in a Z shape.)

You would probably be better off with Sehven's method, that I wish I would have known about a long time ago.
2010-05-25 02:15:00

Author:
KlawwTheClown
Posts: 1106


Wow, I wasn't expecting such a positive reception to that idea. Anyway, if you're gonna' go with the emitter thing, there's a few things to keep in mind (http://www.lbpcentral.com/forums/entry.php?1041-Emitter-Blocking-Theory).

First off, you can't use gas to detect collisions: it'll just go ahead and emit right inside whatever you're colliding with. You can use dark matter, but it'll only detect things that aren't dark matter or glued to dark matter (see the above link to Rtm's emitter blocking theory). You could actually use that to your advantage, I suppose: a dark matter emitter could be used to detect contact with free-moving objects, but not to detect the walls/ground/ceiling. For my ground sensor, I used pink floaty made invisible (https://lbpcentral.lbp-hub.com/index.php?t=17759-Creating-Editable-Invisible-Material-In-Seconds) (though I guess the material choice really didn't matter). I ran into a problem, though: even with the frequency and lifetime perfectly synced, the switch wouldn't register a continuous ON signal: it would detect the brief window of time between the previous floaty key disappearing and the new one emitting, even if I used the super emitter from the mgs bubble dispensor. My solution was to add a velocity to the floaty key, so that it would move out of the way for another one to emit, and set its lifetime a bit higher than its frequency.

Obviously, this limits what you can do with it. You can't emit a ring around your object that can disturbed by contact on every side because the ring will block the next ring from emitting. I also had a problem with larger shapes bouncing off the ground and blocking the new ones from emitting, so that's another problem. I ended up using a long straight line of floaty that parallels the mech's feet. Because of this, it works great detecting the ground when it's upright, but not as well when it's leaning.

One thing I hadn't thought of trying is plasma and paintballs. Since they can't collide with other plasma/paintballs, they may not block each other out of the emitter either, but I haven't tested this at all. Plasma balls are noisy when they emit even if you de-lethalize them and paintballs will make messy splats all over the place, so they're not without their own problems even if they do work.

[Edit] Just tested plasmas and paint balls and they're both able to emit overlapping each other so they will work for contact sensors. Now if only there was a way to make the plasmas shut up and keep the paint from leaving stickers.
2010-05-25 03:28:00

Author:
Sehven
Posts: 2188


Well, not many of us are as BOSS at making mechs as you, Sehv. I'm sure we'll be able to use your method for our own, less complicated purposes 2010-05-25 05:23:00

Author:
KablooieKablam
Posts: 364


Thanks for all the replies and to Sehven for his blocked emitter method of ground detection. I think the most Thermo efficient method for me to implement will still be a rather conventional one -- a magnetic switch array which produces a detection field that roughly outlines and encompasses my spacecraft (in this application), and appropriately mounted magnetic keys on the colliding objects.

This discussion did bring to mind a potential design for a simple accelerometer: A square/triangular piece of pink floaty mounted with a magnetic key, and surrounded (boxed in) by a square/triangular array of flat plates mounted on springs to a larger square/triangular box. At the base of each spring on the larger box is a magnetic switch, and all magnetic switches are wired to a common OR switch. A magnetic switch will activate only if one of the springs is compressed enough to bring the key on the pink floaty piece close enough. The entire assembly is mounted on whatever object you want to detect accelerations on -- provided the physics engine can handle this arrangement.

For my application, I don't know that there is enough difference between normal spacecraft motion and the 'collisions' I want to detect to permit tuning of the above accelerometer to tell them apart. I might play with it.

-- Nanluin

EDIT TO ADD: the above 'flat plates' will all probably have to be connected to form a hollow, contiguous 'box' around the free-space containing the pink floaty piece. This means that as one spring is compressed, the others are stretched (requiring more force), *but* it also keeps the pink floaty piece from getting stuck in the boundary between two of the plates above. Experimentation required.

FURTHER EDIT: why have the pink floaty piece free-float at all? Simply mount *it* in the center of the hollow space by a spring going to each wall of the larger box. Done. As with many of my ideas (in logic too), it starts off more complicated than it needs to be, and then gets streamlined. I think I'm done talking to myself now.
2010-05-25 17:27:00

Author:
Nanluin
Posts: 98


a magnetic switch array which produces a detection field that roughly outlines and encompasses my spacecraft (in this application), and appropriately mounted magnetic keys on the colliding objects.

That's fine if you're not trying to detect collisions with the ground. On my MkII and VT-4 mechs, I needed ground detection so I ended up putting mag keys all over the ground, which ate up a healthy chunk of thermo. But if you're only worried about enemy ships and you can get away with few or even one key per ship, then that would be a decently thermo-efficient solution.


This discussion did bring to mind a potential design for a simple accelerometer: A square/triangular piece of pink floaty mounted with a magnetic key, and surrounded (boxed in) by a square/triangular array of flat plates mounted on springs to a larger square/triangular box.

I made a motion sensor using a similar method to my ground sensor: it emits tiny dark matter or gas with a mag key. When the vehicle moves, it leaves the mag key behind and switches placed on the vehicle detect the key. It's more of a speedometer than an accelerometer, though. If that doesn't make sense, it's demoed in my vehicle tools level (https://lbpcentral.lbp-hub.com/index.php?t=22150-Vehicle-tools-Tilt-and-motion-sensor-and-control-pod-%28Copyable%29).
2010-05-25 21:11:00

Author:
Sehven
Posts: 2188


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.