Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: emildragan on June 20, 2019, 08:30:38 AM

Title: Urgent help needed on how to create a color picker
Post by: emildragan on June 20, 2019, 08:30:38 AM
Hello,

I have a red sphere and below 80 cubes. I want to be able when I click with mouse on the sphere(mouse pick event mouse down) to hover over each cube and to become red individually.(mouse pick event mouse over).

Please advice me what is the best solution to accomplish that. I have tried like in the attachment, but it s a huge work to put everything manually, cube by cube, material by material, there should be an easier an more automatical way.

Thank you very much.
Title: Re: Urgent help needed on how to create a color picker
Post by: jeanfabre on July 18, 2019, 03:05:13 AM
Hi,

it's going to be easier if each cube has a picker drop fsm that listen to mouse hovering, and upon hovering, query a manager if it needs to change its color, then you can make a template out of this and add that to all your objects that needs to react on coloring hovering.

 you could also simply use a global variable, and if the color is not 0,0,0,0 it gets applied.

 Bye,

 Jean