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

Impact sensor doens't do the trick.

Archive: 21 posts


Hi guys,

I have an object that moves downwards and a vehicle that the player can control in horizontal movement only. When the vehicle somehow touches the object, or vice versa, I want the object to explode, but the vehicle to stay where it was. What I mean by that is the vehicle may not be pushed back by the collision of the two things.

So what I did:
- I placed a tag on the vehicle
- I placed an impact sensor and a destroyer on the (downwards moving) object
- I connected the impact sensor to the destroyer and set the destroyer to "explode".
- I tweaked the impact sensor to "include touching - yes"

The result:
The object moves with a certain speed towards the vehicle, but when the two collide - because of the speed that the object had - the object pushes the vehicle a bit downwards before it explodes. For my level it is very important that the vehicle can only move in a horizontal line, so it may never be pushed downwards!

So my question is, how can I fix it? I pefer the obstacle not to be made out of hologram material, but if there is no other way, I guess I should use that as a solution....
2011-03-27 23:17:00

Author:
Unknown User


try putting another impact sensor on your horizontal moving vehicle that interacts with the tag of the downward moving object, and connect it to a 100% dampening anti-gravity tweaker. That should hopefully do the trick.2011-03-27 23:21:00

Author:
iliketosayblah
Posts: 77


Thanks for the quick reply.

With your method however, the vehicle still gets pushed downwards a little bit. This is because the two materials collide and THEN the logic will be activated. So the vehicle gets pushed back because of the collision, and then immediately stops moving. So it does help a bit, but there is still downwards movement...
2011-03-27 23:30:00

Author:
Unknown User


Well the impact sensor is glitched i will give you some advice to steer clear from useing it.2011-03-27 23:42:00

Author:
tuyyui
Posts: 175


Not knowing the full lay out of your level this is just a guess. Try putting movers on the vehicle that move it back to a holo track that follows the path you want.2011-03-27 23:44:00

Author:
MrNlCE
Posts: 27


have you put an antigravity sensor with a tweaked dampening? With enough dampening your vehicle should be pretty stable.2011-03-27 23:57:00

Author:
tdarb
Posts: 689


@tuyyui: What do you mean exactly? The way the impact sensor behaves somehow makes sence. It's just a shame that you cannot tweak it to stop the impact from happening before performing the desired action...

@tdarb: Even with 80% dampening, the vehicle still gets kicked backwards upon collision. I want to keep my 50% dampening, to keep the steering a bit "floaty"

@MrNice: That might just work. I'll look into that tomorrow and see if it helps
2011-03-28 00:11:00

Author:
Unknown User


suppose you had your actual mover logic on a piece of Holo, an then have your vehicle following that with a follower set to 100% accel and decel.

Since you never actually impact with the mover object, it should remain in place.
The follower should be strong enough to keep the vehicle in place in relation to the holo piece it is following.
2011-03-28 03:16:00

Author:
tdarb
Posts: 689


I suggest just gluing a block of holo slightly larger than your vehicle onto it. Holo still activates impact sensors, so by the time your holo impacts the obstacle, it's already destroyed just before impacting it. The size of the holo block may vary depending on the speed your vehicle is moving at.2011-03-28 05:19:00

Author:
Shuriken_Star
Posts: 114


@tdarb: That sounds interesting. I'll try it out later today ^_^

@Shuriken_Star: I already tried that, but it didn't work. First of all, it's very hard to find the right size for the holo, and seccond of all, my vehicle's speed will vary throughout the level, so it's a no-go anyways
2011-03-28 08:21:00

Author:
Unknown User


@tdarb: That sounds interesting. I'll try it out later today ^_^

@Shuriken_Star: I already tried that, but it didn't work. First of all, it's very hard to find the right size for the holo, and seccond of all, my vehicle's speed will vary throughout the level, so it's a no-go anyways

Hmm I would have thought Shruiken_Star's method would have worked.
Try gluing invisible holo onto the obstacle and put the tag on that in order to trigger the explosion.

Otherwise tdarb's method sounds good, it will still move though from the impact but should move back.
2011-03-28 12:00:00

Author:
thor
Posts: 388


Failing this if you have a "spare" layer (preferabley the back thin layer) you could use a glass rail like a slot car.

Or place the rail out of the camera sight and attach via holo.
2011-03-28 13:24:00

Author:
MrNlCE
Posts: 27


Both of MrNICE's methods work Good Luck with your game and I hope to try it 2011-03-28 16:22:00

Author:
Flamento
Posts: 352


Otherwise tdarb's method sounds good, it will still move though from the impact but should move back.

it shouldn't. The holo controls the movement so the floaty behavior remains in tact regardless of what the actual vehicle does. since there are no physical links between the two parts, impacts on the vehicle will never move the holo.

If the speed and strength is set high enough, there should be no movement of the vehicle due to impact. It probably won't be necessary, but setting up an anti grav sensor with strong dampening would prevent any tiny movements.

I'm using a similar technique on another level I am working on where impact jitter could throw the vehicle off course.
2011-03-28 20:27:00

Author:
tdarb
Posts: 689


I'm currently experimenting with tdarb's method, but I still got a little problem.

So the vehicle follows the piece of hologram you can control. However, on both left and right sides of the road are walls. The vehicle cannot pass through those walls, but the piece of hologram of course can. So what I want: moving the holo piece further to the left doesn't work when you hit the left wall, and moving further to the right doesn't work when you hit the right wall.

I guess I should toy around with impact sensors and some direction combiners to control the left- and right-movement, but I have no idea how exactly... Anyone?
2011-03-28 20:30:00

Author:
Unknown User


This is how I created game board borders. on the left wall (or on a piece of holo) put a tag labeled "left", and put one labeled "right", on the right.

Now run two corresponding impact sensors on the holo set to inverted so that they are active when not in contact with the tagged walls. Run each of these through an AND gate along with your movement signals for left and right. Now when it hits the left wall it interrupts the signal that tells it to move left, and then it does the same on the right.
2011-03-28 20:35:00

Author:
tdarb
Posts: 689


Hehe, I just figured it out myself. Exactly the same method Thanks for the comments, I think it is now working ^_^ I'll try to tweak it even further, but I think I've got the basics right now

I'm curious about your level now, tdarb! Sounds a lot like the one I'm working on. Maybe you can show it to me on your moon someday

Just a quick question, didn't want to make a whole new thread for this: is there a way to change the color of the score you recieve using a score giver?
If the player loses points, I want it to be displayed in red...
2011-03-28 20:40:00

Author:
Unknown User


Now run two corresponding impact sensors on the holo set to inverted so that they are active when not in contact with the tagged walls. Run each of these through an AND gate along with your movement signals for left and right. Now when it hits the left wall it interrupts the signal that tells it to move left, and then it does the same on the right.

This works very fine, but you'll find that the controls "glitch" a little when they are routed through AND gates.
In order to fix this, add direction splitters and combiners like illustrated in this pic:

http://id.lbp.me/img/ft/92da72a96f6af459531ae29ecbeb783e5972acc1.jpg

Picture courtesy of troll_sb @ LittleBigLand. A very very smart Sheila!
2011-03-29 18:35:00

Author:
Discosmurf
Posts: 210


This works very fine, but you'll find that the controls "glitch" a little when they are routed through AND gates.
In order to fix this, add direction splitters and combiners like illustrated in this pic:


Yeah I should have mentioned that, but I just overlooked it. Nice catch. This is the one I was describing when I posted that.

http://i135.photobucket.com/albums/q149/tbradt/lbp/lbp2%20complex/grid.jpg

Ignore the messiness of it please. All those timers and counters in the middle are to pulse the movement so it moves on a grid, then after a delay will quickly repeat rapid grid movement for long presses on the directional button. It also prevents diagonal movement.


@morphweasel. it's for a tower defense level. it does seem like some of the concepts apply to both.

I don't know of any way to change the colors for the scores. i've not used that much.
2011-03-29 20:53:00

Author:
tdarb
Posts: 689


Hehe thanks for clearing it up guys, but my methods allready works perfectly fine

I opened a new thread about the colors just to be sure. I think I'll get more response that way, but I'm affraid it's simply impossible
2011-03-29 21:19:00

Author:
Unknown User


The problem using the impact sensor with the destroyer is that the destroyer type has different delays between becoming destroyed and nonpyshical, explosion is different than dissapear...but since you want the explosion, you need to offset the delay by changing the impact sensor to a tag sensor...2011-03-29 22:57:00

Author:
hungryhippo
Posts: 76


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.