playMaker

Author Topic: How do you make an object look highlighted?  (Read 10663 times)

ImagineTheEnding

  • Playmaker Newbie
  • *
  • Posts: 3
How do you make an object look highlighted?
« on: June 10, 2015, 01:06:24 AM »
Hello,

Through Playmaker, how do I make an object look like it's highlighted when I hover over it with my mouse?

Here are a couple examples of what I mean:




I apologize ahead of time if this has already been covered in the forums. I searched for this myself but couldn't get the exact answer I needed.

Thank you!
-Imagine

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: How do you make an object look highlighted?
« Reply #1 on: June 10, 2015, 03:02:16 AM »
You'd probably need to use a special shader like this http://wiki.unity3d.com/index.php/Silhouette-Outlined_Diffuse Here's a premade one at the asset store https://www.assetstore.unity3d.com/en/#!/content/3813

You'd just use playmaker to switch the shader on/off or change the models shader- the outlining is done by the shaders
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

ImagineTheEnding

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How do you make an object look highlighted?
« Reply #2 on: June 10, 2015, 04:10:13 PM »
Oh ok! Thank you!

Now I am having trouble figuring out which action to choose so that when my mouse is over the object the shader appears. I don't see anything like "mouse over" or "mouse hover".

What would I choose instead? I am new to playmaker, so I apologize for my cluelessness.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How do you make an object look highlighted?
« Reply #3 on: June 10, 2015, 06:04:17 PM »
If the shader approach is confusing you can also use something like See Through System on the asset store but it isn't as performant.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

ImagineTheEnding

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How do you make an object look highlighted?
« Reply #4 on: June 10, 2015, 06:40:54 PM »
After tinkering around with it, I got the shader to work. It now appears when I place my mouse over the object.

However, I have a new problem.



In order to get it to work I had to add the action "Set Material" to the second state. Then I added the appropriate Material to the slot. However, I want the material to disappear when the mouse is no longer over the object.



But as you can see above ^. It doesn't do that. "Set Material" makes the material permanent, not temporary.

Does anyone have an idea on how to remedy this?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How do you make an object look highlighted?
« Reply #5 on: June 10, 2015, 07:13:53 PM »
The material can't 'disappear'. You should get the material before changing it, then when you mouse off of the object set it to the old one.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D