Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

How ot make object pass through another object- but still detect impact???

Archive: 15 posts


So here is my problem:
- I have the top-down RTS demo. The enemies should shoot each other (emited projectiles)
- The hit is detected by the Impact senzor on both objects - if object with specific tag hit unit - life is decreased. And if projectile hits anything it will explode.

This is wokring fine excpet one small detail - when two units are shooting at each other, the projectiles meet at he middle, hit each other, explode and do not hit enemy.

How to solve this? I need some way, hot to make prjectiles pass each other - but still be able explode them, if they hit anything else. Any ideas how to do it?


Here are some, that are already excluded:
1 - Holographic projectiles and tag detection - almost imposible to detect hit of the enviromnemt, Due to different shapes of the units/buildings the hit is not recognizet perfectly. And using tag detectnion is causing troubles under heavy fire (the tag senzor is detecting some tags constantly = starting decrease life action only once)
2 - Emiting the projectiles little to the side, so they dont meet - this is partial solution. This may decrease echange of the projectiles colision. But depending on the angle it still can impact. And does not solve the problem of huge crossfire, where even projectiles of my army can meet before reaching targers and noticably decreasing firepower.
3 - Adding some randomness to the emited projectiles position. This is already implemented, but looks strange. So Im triggering it only if the unit is not able to kill target for a long time. This should be a workaround for some athoer troubles triggered only accasionally. Not a standart feature how the fight goes each time.

So any other ideas, how to detect impact on all expect one object? And in case of that impact, pass the object through each other? Is there some material tweaker, that could achieve tis? (even if I should activate it only for the time of paasing the emitors.) Or some material that is like hologmar, but still can detect impact by the senzor?

Thanks
2011-02-13 19:15:00

Author:
Agarwel
Posts: 207


If impact sensor fail for you (are you sure you turned on rigid connections and touching?) by the shape, make following holographic hit boxes, you can make then outline so they will detect single hit.2011-02-13 19:20:00

Author:
Shadowriver
Posts: 3991


No my problem is - impact senzors are working fine (with using solid materials) - the problems is - I need one excpetion. If two specific (tagged) object meet, I need them to not colide at all. And colide to any other object.

The bullets are hiting tagrgets and enviroment fine. Problems is, they are hiting even each other. And thats gamebreaking. And need bullets to ignore each other completelly.

I hoped that temporarz gas tool may help (that maybe two gassed object will pass through each other and then I will disable gas and make them solid again) - but it is not possible to use danger tweaker to turn in to the gass.
2011-02-13 19:30:00

Author:
Agarwel
Posts: 207


Maybe - and this isn't the greatest idea I've ever had - certain projectiles move back a layer when fired and they avoid the other players fire in a different layer, then come back to shoot.

If the projectiles you shoot are hollow and one thick layer, the can still detect impact, it just happens when the object goes into it.

On your holo projectile have a tag sensor which makes it explode when it hits a wall and a tag with a different label that explodes on impact with the ship. Therefore it only explodes when it

1) Hits a wall
2) Hit's a player

You can make a tag cover a whole wall with one tag, I believe Bremnen told me on my Sackbot Wall Climbing thread.

I have no idea if that works, sorry if I haven't helped.
2011-02-13 19:59:00

Author:
mutant_red_peas
Posts: 516


Now this is not a standart platforming level, where I should shoot player. It will be RTS.
Here is how my previous level looks like to give you the idea:
http://ib.lbp.me/img/ft/0bbe4faad698548698140ef4c1b79fa583d1b980.jpg
(or you can test it here http://lbp.me/v/xhg8ft if you have time)
But it is inperfect in many ways - so I want to create sequel, where I will fix the bugs/workarounds and strange behaviour.

This shooting is one of them. In the previous level I used holografic bullets + tags. But it is rather buggy. specially on bigger buildings, if you can detect tag only by the circle (or part of it, but thats making it crazy). And as I said - if the building is huge and under heavy fire - the tag senzor will emit constant ON - which is interpretted as one hit. I make some workaround abou that. But if you will go deap - the damage on the building is kind of random. I would like to avoid this as muc has possible.

Also using tags to decet walls may add to the complexity of the level. And Im laready fighting wit hthe thermometer. If you consider RTS map - it yould be crazy to spray all walls and enviroment with wall tag. :-/ I would like to avoid that.

Im using the object as thick as possible - so I can not even use standart "projectiles" (water etc) - because this can hit only 1 layer thick object. Not the obejct that is between layers :-/

So far I also though only about moving it up and down for a while (but it might stil lbe buggy especially in the bigger battles) and would look strange.

So now Im rgetting out of the ideas :-/ But there has to be some way, how to make one kind of the object to ignore each other (holo probably so it can pass each other), stil ldetect impact on other object. Without tagging whole map.
2011-02-13 20:14:00

Author:
Agarwel
Posts: 207


You will need four things
1 A holo mover- a piece of holo material with a mover on it that is fired from your gun.
2 a neon bullet- your actual solid bullet, with a follower on it so that it keeps pace with the holo mover.
3 a holo bullet- an exact duplicate of your neon bullet.
4 fancy "pew pew pew" laser sounds

Now when you fire a shot, you both of the holo items. The holo mover will act as the guide for your path. The holo bullet should be following it. directly in the center

You'll want the holo mover to be slightly larger than the bullet so that when it detects an object that is not another bullet, it can quickly emit your solid bullet to handle impacts.

Alternatively, you could emit both the holo and solid bullet together following the mover. Then, if it detects another bullet impact, it can quickly destroy the neon bullet, and emit it once again when the paths are clear.
2011-02-13 23:42:00

Author:
tdarb
Posts: 689


Hmm. I will have to try the emiting. Hope it will work.
Im afraid if the game will handle it if there will be lots of logis and emiting bullets and the same time. I already failed to create Lumines (http://lbp.me/v/x958f7)
It was working in similar way - player is controlling holo cube. And anytime he moves it - the physical cube is destroyed and emited new one (setting 0,1sec) - this way I avoided the physical rotation, that could lead to bugs in tight areas.
The problem is - with all that logic and tag senzors, the 0,1sec emitor sametimes takes 2-3sec to emit new cube. Making the game almost unplayable :-/

Dont want to achieve that again :-/
2011-02-14 07:08:00

Author:
Agarwel
Posts: 207


Can I just ask, what's an RTS?2011-02-14 09:36:00

Author:
mutant_red_peas
Posts: 516


Can I just ask, what's an RTS?

http://en.wikipedia.org/wiki/Real-time_strategy
2011-02-14 09:40:00

Author:
Aya042
Posts: 2870


So I tested the holo/solid combination solution (having holo bullet emiting solid bullet. So if the solid hits another bullet, it will re-emit afterward. But if it will hit any other target, it wil ltrigger tag, that removes also the holo bullet)
Its not so good. As I was afraid - even with emitor configured to 0,0sec it is "too slow" and making too long dead zones in the bullet trajectory So the solid bullet is not there for a while after meeting other bullet. It is really short time. But long enough to miss the target :-/

So so far, the old holo+tags solution looks like the best :-/ Even with all the negatives :-/
Ou man. I hoped to make it so much better this time. And it seem I have to use compromises and workaround again even aat the bullt level :-/ (actually quiet important part of the RTS)
2011-02-14 10:05:00

Author:
Agarwel
Posts: 207


Why use solid bullets at all? A holo bullet should serve your needs perfectly. Anything you do with solid bullets will cause collision problems.

Make your holo bullet, stick an impact switch on it. Set it to include touching, include rigid connections, and require a tag. Then place that tag on everything that it CAN hit. If you don't want to put the tag on everything, then you can reverse it: put two impact switches, one set to require a tag and one not. Invert the output of the tag one and hook them into an AND gate. Now it will react to a hit against anything that doesn't have a tag, so you can just slap the tags on the bullets (it'll ignore it's own tag and only react to the tags on other bullets).
2011-02-14 15:34:00

Author:
Sehven
Posts: 2188


Sehven:
omg - you maybe solve my problem. So the "allow touching" option will actually detect impact on holo object? (so far I thought it is for grab touching from players :-/). Because without it, the holo does not detect the impact at all.
When I get back to LBP2 I have to try that. The second option.... it will active at any impact (touching) except taged bullets. That way Im saved.

If that works, you will be my hero.
2011-02-14 16:09:00

Author:
Agarwel
Posts: 207


Sehven:
Hey man, it totally works. Include touching solves all problems. Why did not I thought of that, hmm? :-/ I can stil ldetect all impacts (much more precise that using tags with circle area). And easy to exclude some tagged objects from the logic curcuits.
I will still have to tag the enviromnent (include touching unfortunatelly detect iven ground, so I can not just leave impact sensor to detect any impact) - but it will be much easier this eay, than using tag detectors. Now I will need to use just one tag for each huge rock. Its much more effective than using tagt to draw perimeters around whole map.

So thanks - you saved me. Now my amunition is done. Lets move to imrpoving units and buildings.... this should be easier.
2011-02-14 19:31:00

Author:
Agarwel
Posts: 207


If your environment contains too much stuff to tag them for collisiaon detection, consider drawing a 0% brightness holo shape that is the outline of the entire zone, just a little bit thicker than the the shapes of the environment. Stick a tag to that holo shape.2011-02-14 21:22:00

Author:
Antikris
Posts: 1340


Antikris:
That wont be a problem :-D Due to RTS complexity on the logic chips, Im already fighting wth thermometer. So I wont be able to put many decorations and non-gameplay object to decorate the map. So tagging will be easy.
2011-02-15 06:45:00

Author:
Agarwel
Posts: 207


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.