Home › Forums › General Questions › problem wit combining “when clicked” and “when hovered” puzzle
- This topic has 12 replies, 2 voices, and was last updated 3 years, 3 months ago by gf3d.
-
AuthorPosts
-
2021-08-22 at 7:43 am #43898gf3dCustomer
hi there i´m still having problems with combining the “when clicked” and “when hovered” puzzle….
I want an object to change material when i use those puzzles,
they work fine separately but not when they are both enabled.
Then its only the “when hovered” that works fine…I tried it in several ways but no change….
Has this to do with priority?Anyone has an idea how to solve this?
2021-08-22 at 5:54 pm #43903xeonCustomercan you post a sample of your puzzles and a sample scene.
I use when clicked and when hovered frequently but not sure how you are using them. If you have an object and three other objects (planes) of three different materials in the scene (default, hovered and onclick), then you could have the material change color on hover and change again on click. The key is making sure that the color planes are still in the scene. You would also need some sort of other trigger to restore the color to default if needed.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-08-22 at 11:38 pm #43905xeonCustomerHere are two options.
Option 1: resets the objects color on hover exit to initial color
Option 2: sets the color after click but still alows a hover state.Scene setup:
three mesh planes – with Material.001, Material.002 and Material.003
Material.001 is the default
Material.002 is hover
Material.003 is on clickBasic cube for object.
puzzles attached.
Attachments:
You must be logged in to view attached files.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-08-23 at 8:43 am #43914gf3dCustomerhi xeon,
your solution brought me on the right direction…
now hover and click work……
But another problem showed up….
by setting the “set clicked” to “1” after i clicked the object
it remaines on “1” until i reset it by using another object to do so.See the screenshot..the little sphere is my reset button….
It resets al the materials to the origin and also the “set clicked” to “0” again.as long as the “set clicked” is on “1” even the other objects act as
if they were “clicked” even if they are only “hovered”This is a Test project for a bigger project that is coming up…
How can it be done that the “set clicked” it set to “0” again after
an object is “clicked on” so i can hover other objects…Hope you understand what i mean
Greets
Ger
2021-08-23 at 8:45 am #43915gf3dCustomer2021-08-23 at 3:10 pm #43919xeonCustomerHi Gf3d,
I think I am missing some information or not able to understand the logic of what you are trying to do given the scenes and the puzzles.Given the scene…I see: orange/bronze, yellow, green, gray, andd red potentially being in your logo letters.
The reset button seems fine…
What are the objects 01, 02, 03 and 04 along with the _A versions?
Are these faces on the cube? Rings segments on the floor? There are eight segments so it aligns with the reset count.Can you explain the logic of what this is supposed to do?
From what you are telling me … it sounds like you hover over a ring and it changes color to red…. exit hover…its been asisgned two colors gray and green? but when clicked its red. This seems odd in logic sense you have grouped their hover and clicked states to be the same color.Now thats its clicked…its red and stays red…because the hover color is red. I would think you would want your hover and clicked colors to be different to distinguish their states.
If you are wanting a flag reset to 0, you could add a timer to your onclick and reset it to another material after a specified time.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-08-23 at 4:33 pm #43922gf3dCustomerHi Xeon,, in fact its really simple
Forget about the rings on the floor etc ( just dekoration )
its about the 4 planes and 4 cubes
planes are named 01 – 04
cubes are named 01_A – 04_Ai either want to hover or clicked on them
when hovered 01 and 01_A should change color
when clicked they should change and stay that coloruntil i click the reset sphere…
works fine so far…..
But as soon as one of them is clicked the other squares or planes
react as if they were clicked..even when they are hovered…
i guess its because the set clicked puzzle it set to “1”as soon as i push the reset sphere its et to “0” again
so what i miss is that after the set clicked puzzle is set to “1”
to make the when clicked puzzle work, its set to “0” again so i can hover the other objects. the already clicked objects should remain their color until i push the reset sphere..Hope you understand?
greets
Ger
2021-08-23 at 5:06 pm #43924xeonCustomerOK… I am confused on the 4 planes and 4 cubes.
4 planes – for the four colors…
4 cubes…where are those and how do those work?Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-08-23 at 5:36 pm #43925xeonCustomerOk…If I have this right…you will need multiple flag variables…
In this example…. four cubes, four colors.default color is gray
Rollover color is red if not clicked
Rollover color is green if clicked
Clicked color is blueIf you would like the project file…shoot me an email at xeonjcase @ gmail . com and I will zip it up and send over.
Attachments:
You must be logged in to view attached files.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-08-23 at 6:02 pm #43927gf3dCustomerHo Xeon,
just tried to send you an email with the project
It came back….
write me an email at gf@gf3d.de
Greets
Ger
2021-08-23 at 8:15 pm #43929gf3dCustomerHi xeon,
i received your mail…cannot open the link
when i tried to answer your mail it could not be delivered….
would like to send you my verge data
Greets
Ger
2021-08-23 at 8:46 pm #43930xeonCustomerxeonjcase@gmail.com
Gmail will not allow zip files containing .js files
So if you have an FTP or drop box…etc… let me know and I will drop the file.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2021-08-23 at 11:50 pm #43931gf3dCustomerhi xeon,
thanks..i just ha d a brieve look at it
seems to be exactly what i needgreets
Ger
-
AuthorPosts
- You must be logged in to reply to this topic.