Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
"when cursor moved over do something" how stop this from working between walls?

denko
Registered User
Quote
2023-12-22 08:53:31

Hi,
I have a problem that drives me crazy.

I've assigned "when cursor moved over do something" on an object, it works great. But when the cursor is moved over the object and there is for an example a wall between - it still works.
But I need the function to not work if there's objects, walls, etc. between the object and the camera.

Any ideas?

Thank you!


sven
Registered User
Quote
2023-12-22 10:47:42

You can use DISTANCE script..
You can use RAY_HIT script

https://5v3n.itch.io/coppercube-...

Depends on your needs DISTANCE script might be good enaught so no need to do ray check.

if you need to do rayCheck then Distance script must be included .. you dont want to shoot rayCheck over the map unneeded -if you have large map and many objects that are possible to be mouse_over.

Logic behind:

IF mouse over THEN
DO check distance:
IF distance small enaught THEN
DO raycheck if needed:
DO mouse over action:
ENDIF
ENDIF


hadoken
Guest
Quote
2023-12-22 10:57:14

@denko

if you are a non coder checking for blocking walls plus assigning actions (e.g. cursor over object) to both cases also easily possible with this:

https://hadoken-records.itch.io/...

🔎︎


🔎︎



Guest
Guest
Quote
2023-12-22 12:37:26

or you can just turn on the option No action when occluded in the mouse hover behavior.


sven
Registered User
Quote
2023-12-22 13:30:06

Guest wrote:
or you can just turn on the option No action when occluded in the mouse hover behavior.


For me -On mouse over it seems to not work.. works fine with on klick.


denko
Registered User
Quote
2023-12-22 21:31:39

Hi again,

I'm going crazy.. I can't figure it out.
I have objects that get's highlighted and text appears when the camera/cursor is over the object, and it works perfectly.
BUT I really can't make so it DON'T happen when walls/doors and such is in the way between the camera and the object - the text still appears and so..

Thanks!


denko
Registered User
Quote
2023-12-22 23:25:59

Wow, the camera's target was way off so it made everything not working properly...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact