Page 1 of 1

Click on Entity and do something

Posted: 2020-02-11, 14:31
by arfur9
How would I make an entity clickable or have the HUD change the cursor/crosshair as it enters and leave the entity?

I realized you could do something like Pipmak or Dagon (panoramic games) with Cafu.. some quick tests and the cube map quality looks good, although the cubic image order is usually numeric in Pipmak or Dagon so everything I use to render frames uses numbers (0001,0002....) is it possible to change the suffix type?
I have loads of stuff already rendered lol

Re: Click on Entity and do something

Posted: 2020-02-13, 11:33
by arfur9
ok, I've done it with a gui hotspot but it is zfighting badly even after adding cmat options
I'm not really sure why the gui is running off the cube, the cube should be 2x2 metres the gui is 512x512
the text at the top should read "clicked", the cursor is a magnifying glass
I tried it without a face where the gui is but the back faces don't show so it looks weird, plus I have the gui running off

Re: Click on Entity and do something

Posted: 2020-02-13, 12:40
by Carsten
I'm not sure I understand your question?
What suffix types should be changed?
The easiest way to click something is indeed a GUI (or simple to fire on it). How did you make the GUI in the screenshot?

Re: Click on Entity and do something

Posted: 2020-02-13, 13:38
by arfur9
Usually doing cube faces you would render 6 camera views or maybe run an animation, usually its animation so irradiance is cached, most of the plugins or scripts I use would suffix with a numeric value not nz, px and so on.. I already have a bunch of images rendered it would be a pain renaming them

I think I've figured my gui problem, however I can't get it to match the lighting

How do we "fire" on something?
The box with the gui.. how do I detect the mouse down event on it if the entity has no gui..
I just need to know how to get the hit detected in console, I'll figure out the rest
For some reason I suck at lua, I just need a snippet in context an hopefully it'll sink in