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

i need to make objects to be stcky on command

Archive: 21 posts


Its a Move puzzle level.

I need a way to make it so that once a player moves a piece into place, they can press a button and that piece either becomes heavy or sticky so that moving another piece up to it, wont move the first piece. Id also like a way to reverse this condition in vase the player needs to move the piece again.

Ive tried messing the damping etc. But that makes the pieces hard to move around. Thanks!
2012-06-25 17:10:00

Author:
SirGreenDay
Posts: 144


Have a two port selector. Put the reverse command into the first input and the sticky command into the second input. Then wire the two ports up to two material tweakers, one set to sticky and one set to no stick.
http://www.rob-brown.com/images/stories/blogs/simples.jpg
2012-06-25 17:44:00

Author:
PGdafrog
Posts: 277


Have a two port selector. Put the reverse command into the first input and the sticky command into the second input. Then wire the two ports up to two material tweakers, one set to sticky and one set to no stick.
http://www.rob-brown.com/images/stories/blogs/simples.jpg

I'm sorry I should have mentioned this. I tried this but when I use the material tweaker and change it to sticky, it makes all the pieces sticky, meaning they cant move either. If I "unsticky" to move another piece, the 2 pieces stuck together will move.
2012-06-25 18:01:00

Author:
SirGreenDay
Posts: 144


I'm sorry I should have mentioned this. I tried this but when I use the material tweaker and change it to sticky, it makes all the pieces sticky, meaning they cant move either. If I "unsticky" to move another piece, the 2 pieces stuck together will move.

I haven't used the material tweaker that much but isn't there a setting so that the material only sticks to other sticky materials?
2012-06-25 18:04:00

Author:
PGdafrog
Posts: 277


No such setting on the material tweaker; stickness isn't the way to go here. Hook the logic up to enable/disable a 100% damping gravity tweaker.2012-06-25 18:10:00

Author:
fullofwin
Posts: 1214


No such setting on the material tweaker; stickness isn't the way to go here. Hook the logic up to enable/disable a 100% damping gravity tweaker.

He said in the OP that he'd already tried using dampening. Though on the other hand I don't see why it wouldn't work.
2012-06-25 18:14:00

Author:
PGdafrog
Posts: 277


He said in the OP that he'd already tried using dampening. Though on the other hand I don't see why it wouldn't work.

Yes, but he never said he was turning the gravity tweaker on/off...I have to assume he wasn't.
2012-06-25 18:17:00

Author:
fullofwin
Posts: 1214


Yes, but he never said he was turning the gravity tweaker on/off...I have to assume he wasn't.

Fair enough
2012-06-25 18:19:00

Author:
PGdafrog
Posts: 277


Fair enough

It's entirely possible that the pieces are just difficult to move because of friction. If you have a block and a bunch of other blocks sitting on top of it, it's going to be difficult to slide out, it will get hung up on corners, etc.

You may need a more complicated scheme that prevents them from actually touching, and only allows movement in a grid, etc. If sackboy doesn't need to interact with it, it might be easier just to create the puzzle out of a non-physical material like sticker panel...
2012-06-25 18:30:00

Author:
fullofwin
Posts: 1214


I'm sorry I should have mentioned this. I tried this but when I use the material tweaker and change it to sticky, it makes all the pieces sticky, meaning they cant move either. If I "unsticky" to move another piece, the 2 pieces stuck together will move.

I see what the problem is. Sticky only "turns on" when 2 pieces TOUCH. I need to be able to stick a piece in place, move another pueceinto place against it, then have those pieces stuck in place. Right now the player cant make precise adjustments to the alignment of the pieces because they stick together when they get close to each other.
2012-06-25 18:34:00

Author:
SirGreenDay
Posts: 144


If I'm understanding correctly, the anti-gravity tweaker with 100% dampening should do the trick, provided that it's turned on and off at the right times. You might try a Grab sensor with reversed output to the anti-grav, that way it's on whenever the player isn't trying to move the piece and turns off whenever the piece is grabbed.2012-06-25 21:32:00

Author:
Pookachoo
Posts: 838


I'm sorry I should have mentioned this. I tried this but when I use the material tweaker and change it to sticky, it makes all the pieces sticky, meaning they cant move either. If I "unsticky" to move another piece, the 2 pieces stuck together will move.

make the material sticky by default with a material tweaker. add a grab switch and attach it to the material tweaker. now when you grab the material the material tweaker turns off and you can move it

you may want to put a timer in between this logic before sometimes when you let go the material block (or whatever it is) will stick up on its end or at a slight angle. if you set the timer to about .02, that should give the material enough time to settle itself before sticking

edit: sorry I misread, but all you have to do is use the MOVE logic instead of the grab
2012-06-25 22:56:00

Author:
GribbleGrunger
Posts: 3910


Just to explain the concept. There are 7 different shapes. They are the thickness of the thin layer. The player just slides the pieces around the board. It all happens on 1 layer. No picking pieces up, just edge to edge, by sliding them around the board with the Move controller.2012-06-26 02:22:00

Author:
SirGreenDay
Posts: 144


Just to explain the concept. There are 7 different shapes. They are the thickness of the thin layer. The player just slides the pieces around the board. It all happens on 1 layer. No picking pieces up, just edge to edge, by sliding them around the board with the Move controller.

the above would work then. instead of thinking: 'how can I get them to stick after I've moved them', think, 'how can i unstick them to move them'.

it's much easier that way. I don't know how to use the move logic so I can't help you there. just have the move logic attached to a material tweaker that is set to sticky (inverted so that it's on). then when you grab the material with the move controller it will turn off, allowing you to move it. I would also change the friction settings too for ease of use.

to sum up: It's sticky with friction before you grab it because you have the material tweaker inverted, then when you grab it with the move it is normal again. if the friction is too much on the material you are using, simply add another material tweaker (not inverted) set to no friction. one turns off to allow you to move it while the other turns on to remove any friction, while you are moving it.

perhaps you may want to throw a gyroscope on there too to make sure the object doesn't rotate (unless you want it to of course)
2012-06-26 02:49:00

Author:
GribbleGrunger
Posts: 3910


I changed it like this. On each piece thee is a 2 port selector. output port 1 is a Gravity Tweaker set to 100% gravity, 60% damping. Its connected to the Main Move button, the big button in the Center. From port 2 its set to 100% gravity, 100% damping. This connects to the circle button.

It works fine except that when 1 piece has 100% damping on, I cant move any piece. When the Move button is pressed, it triggers all of the gravity tweakers.

If I cant get this working ill try the Grab switch method.
2012-06-26 03:46:00

Author:
SirGreenDay
Posts: 144


I changed it like this. On each piece thee is a 2 port selector. output port 1 is a Gravity Tweaker set to 100% gravity, 60% damping. Its connected to the Main Move button, the big button in the Center. From port 2 its set to 100% gravity, 100% damping. This connects to the circle button.

It works fine except that when 1 piece has 100% damping on, I cant move any piece. When the Move button is pressed, it triggers all of the gravity tweakers.

If I cant get this working ill try the Grab switch method.

don't even bother trying to get that to work. just use the method I said above. it really is very simple to do. you shouldn't need a gravity tweaker at all, it should just stick to the material and won't move until you grab it again
2012-06-26 04:41:00

Author:
GribbleGrunger
Posts: 3910


the above would work then. instead of thinking: 'how can I get them to stick after I've moved them', think, 'how can i unstick them to move them'.

it's much easier that way. I don't know how to use the move logic so I can't help you there. just have the move logic attached to a material tweaker that is set to sticky (inverted so that it's on). then when you grab the material with the move controller it will turn off, allowing you to move it. I would also change the friction settings too for ease of use.

to sum up: It's sticky with friction before you grab it because you have the material tweaker inverted, then when you grab it with the move it is normal again. if the friction is too much on the material you are using, simply add another material tweaker (not inverted) set to no friction. one turns off to allow you to move it while the other turns on to remove any friction, while you are moving it.

perhaps you may want to throw a gyroscope on there too to make sure the object doesn't rotate (unless you want it to of course)

The material tweaker has no inverted setting so how would I invert it? And fyi. The grab sensor has Move settings in it, so that's what I use to sense if something is being grabbed, passed over by the cursor etc.
2012-06-26 05:08:00

Author:
SirGreenDay
Posts: 144


The material tweaker has no inverted setting so how would I invert it? And fyi. The grab sensor has Move settings in it, so that's what I use to sense if something is being grabbed, passed over by the cursor etc.

oh, i thought it did lol. just use a not gate before the material tweaker and you'll get the desired effect. the material tweaker will always be on because nothing is happening ('not' happening). then when you grab it the not gate turns off and the material returns to normal for you to move
2012-06-26 05:11:00

Author:
GribbleGrunger
Posts: 3910


the above would work then. instead of thinking: 'how can I get them to stick after I've moved them', think, 'how can i unstick them to move them'.

it's much easier that way. I don't know how to use the move logic so I can't help you there. just have the move logic attached to a material tweaker that is set to sticky (inverted so that it's on). then when you grab the material with the move controller it will turn off, allowing you to move it. I would also change the friction settings too for ease of use.

to sum up: It's sticky with friction before you grab it because you have the material tweaker inverted, then when you grab it with the move it is normal again. if the friction is too much on the material you are using, simply add another material tweaker (not inverted) set to no friction. one turns off to allow you to move it while the other turns on to remove any friction, while you are moving it.

perhaps you may want to throw a gyroscope on there too to make sure the object doesn't rotate (unless you want it to of course)

This works fine until you need to move a piece that's been stuck to another piece. Even grabbing a piece again, which triggers the not sticky tweaker has no effect. Its like once 2 pieces are stuck together, you cant unstick them.
2012-06-26 05:27:00

Author:
SirGreenDay
Posts: 144


give me a moment


This works fine until you need to move a piece that's been stuck to another piece. Even grabbing a piece again, which triggers the not sticky tweaker has no effect. Its like once 2 pieces are stuck together, you cant unstick them.

yes, I wasn't sure whether what you needed would require them to be next to each other. add this logic:

1/ you will need a tag sensor and a tag (labelled the same).

2/ put a gravity tweaker on the chips too; set to max.

3/ connect the move logic to the tag sensor as well as the extra logic I'm going to describe here: you will now need something to turn the material tweaker off on those adjacent pieces otherwise they will still be sticky. just before the NOT gate place an Or gate. put a wire from the tag sensor into the OR gate. and also put the wire from the move logic into the OR gate. make sure the radius is big enough to cover the pieces adjacent to the piece you are grabbing

4/ attach the tag sensor to the tag and the antgrav too. remember tag sensors will not be effected by tags on the same chip, so there's no problem there.

now when you grab the piece it will turn off the material tweaker and turn on all the gravity tweakers of the adjacent pieces. when the piece is out of range again the material tweaker logic will kick in for them and their state will return to normal
2012-06-26 05:58:00

Author:
GribbleGrunger
Posts: 3910


I finally found a solution. Sticky just wouldn't work, so I did this. I made 2 Gravity Tweakers. 1 set to 60% damping. 1 set to 100% damping. I took a Toggle switch and connected this to both Gravity Tweakers. I connected a Grab switch set to sense when something is grabbed and connected to the Toggle switch.

Now, thecplayer grabs a piece and can move it around. To "pin" it in place, just release the trigger, and then pull it again and let go, which sets off the toggle. So, basically the user holds the trigger to move a piece, then pull and release the trigger to pin in place.

Thanks for all of your suggestions! Now if you could look at my thread and figure out why my Emit/Destroy setup doesn't work.
2012-06-26 15:16:00

Author:
SirGreenDay
Posts: 144


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.