PDA

View Full Version : In/Out Touch Material Tutorial



Shamanate
12-17-2012, 07:40 PM
A user at LittleBigPlanetarium was wondering how to make a material move in and out when touched, like in the main story. Here is the tutorial I posted, I hope it helps!

http://www.littlebigplanetarium.com/topic/6027-how-do-i-make-the-touch-material-switch-layers-at-either-front-or-rear-touch/


http://ia.api.vita.lbp.me/img/ft/37aa36eefd5789f5f58bd85f34cc521eb1727d17.jpg

-I have two TOUCH SENSORS for both the rear and front touch screen. The difference between the two sensors is the Activation Gesture, I have both Touch and Swipe. This allows you to touch to the Touchable Material as well as swipe across a Touchable Material to make them all push in or out.

-The touch sensors are going into an OR gate, which leads into a SELECTOR. The SELECTOR makes it so you cannot repeat a front or rear touch and send the Touchable Material out or in more times than intended. If the Touchable Material is in a position, out or in, the opposite action is the only action that can affect the Touchable Material. For example, if you have just touched the Touchable Material with the front screen it will push in once. Now the only action that will affect the Touchable Material is the opposite action, the rear touch pad pushing the Touchable Material out once.

-The top output of the SELECTOR sends the Touchable Material in once. The bottom port sends the Touchable Material out once as well as turning the Touchable Material on.

-When the Touchable Material is on it is blue, when it is off it is green. You can accomplish this by tweaking the Touchable Material so "Visuals When On" is blue with Brightness at 100% and when Touchable Material is off, "Visuals When Off" is set to Green with brightness 100%.

http://i2.api.vita.lbp.me/img/ft/9b2a4decf386bcd81c910906b1bed9dccc7ea0c1.jpg

http://i8.api.vita.lbp.me/img/ft/718d125e587f95a930dfce098d6dfdb5fd3687d1.jpg

-Lastly there is an Anti-Gravity Tweaker with Anti-Gravity at 0%, Dampening 100%, and Zero Buoyancy at 0%. This makes it so the block will not move but can move in and out.

Remember, if you are using a material other than Touchable Material you will need a TOUCH TWEAKER. This will make it so that whatever material you have chosen can be touched. You will want to teak the TOUCH TWEAKER so that Touch Movable is set to "Touch Movable: Touchscreen or Rear Touch Pad."

Hope this helps, I can also gift you the object/logic if you aren't following the tutorial.

comphermc
12-18-2012, 02:26 AM
The difference between the two sensors is the Activation Gesture, I have both Touch and Swipe. This allows you to touch to the Touchable Material as well as swipe across a Touchable Material to make them all push in or out.

You only need the default Touch Sensor. There's nothing special about it - if you touch the object, it will trigger the sensor, whether it's a tap, hold, swipe, whatever. The in/out touch blocks from the story levels just use the default tweak on the touch sensor, and those work just fine.

You also don't need the Touch Tweaker unless you want to add the Touch glow effect, or you want to be able to move the object around (which in this case you don't). The Touch Sensor will work without the Touch Tweaker.

:)

yugnar
12-18-2012, 04:06 AM
Yep, actually the logic could be simplified a lot. Anyway, I'm sure we all appreciate your efforts! It's rare to see a fancy tutorial with pictures and stuff! :)

Roosterland
01-20-2013, 10:57 PM
it took me a couple of trys but i fingered it out.Thanx so much Shamanate 1

Shamanate
02-06-2013, 07:06 AM
No problem. Thanks for the correction on the logic Comphermc!