Home › Forums › Graphics / Blender › Clicking “THROUGH” geometry?
- This topic has 14 replies, 3 voices, and was last updated 4 years, 6 months ago by GLiFTeK.
-
AuthorPosts
-
2020-04-20 at 5:34 am #26076GLiFTeKCustomer
hi
i have some geometry that’s interactive (mouse clickable) that’s WITHIN some other geometry ( an “overlay graphic” cylinder ) that surrounds it.I’ve made that outer cylinder object that blocks the cliks object be “unselectable” in blender in object properties panel.
is there something else similarly simple to do to make sure this doesn’t interfere in my inner objects receiving their click or do i have to do a ]sic] “pointer event = none” type css for any object that shouldn’t get clicks?thanks.
EDIT: i made a list of all objects “UNCLICKABLE_objects” i wanted to be unclickable.
I made a css rule :.unclickable{ pointer-events: none; }
I made an HTML puzzle set att className to “unclickable” for element “UNCLICKABLE_objects”
not making a difference. guess that doesn’t affect webgl elements…?
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-04-20 at 7:57 am #26120Yuri KovelenovStaffHi,
You can check if a picked object is in the list of clickables (or NOT in the list of unclickables)
https://www.soft8soft.com/docs/manual/en/puzzles/Lists.html#find
https://www.soft8soft.com/docs/manual/en/puzzles/Objects.html#get_objects_from2020-04-20 at 8:10 am #26125Yuri KovelenovStaff2020-04-20 at 8:13 am #26126GLiFTeKCustomerOk thanks, Yuri.
I’ll try that.
Hope it lets me “through”Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-04-20 at 9:34 am #26141GLiFTeKCustomerIf you mean the internal object is obscured and thus cannot be clicked, then you can use another transparent object which will receive clicks instead.
oh i didn’t see that second response.
yes i’m trying to click THROUGH an object’s geometry which is a barrier to my clicks.
the clickable objects are INSIDE the cylinder overlay (semi-transparent)hmm yeah having a double hitbox for them wouldn’t work.
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-04-20 at 9:38 am #26142GLiFTeKCustomerIf you mean the internal object is obscured and thus cannot be clicked, then you can use another transparent object which will receive clicks instead.
could i use rendering order to have them “be” in their certain location in 3d, but have a different css z-index ?
don’t know if that translates to webgl tho.Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-04-21 at 6:34 am #26212Yuri KovelenovStaff2020-04-21 at 11:46 pm #26312GLiFTeKCustomerAlas, the only way to go is implement your own object picking feature with JavaScript.
yeah, just want the cursor to never interact with the containing overlay cylinder.
only with objects inside it. (which, can be viewed from any angle…)sure there’s a method for that buried in the dev pages… (whips out giant shovel) ..
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-04-22 at 8:18 am #26333Ivan LyubovnikovStaffsure there’s a method for that buried in the dev pages… (whips out giant shovel) ..
If you’re using the “when clicked” puzzle for selecting objects in the scene, then there’s a little js hack to change the way their selection is managed.
Internally “when clicked” uses raycasting, also there’s an API method Object3D.raycast which is used for testing if an object is picked by a raycaster.
So, if you know an object’s name you can disable it from being selected as follows:
var myObj = app.scene.getObjectByName('myObj'); myObj.raycast = function() {};
And make it selectable again like this:
var myObj = app.scene.getObjectByName('myObj'); delete myObj.raycast;
Edit: forgot to mention that the
app
variable in the examples above is the same that you have in the standardrunCode
function in an application’s js file.Co-founder and lead developer at Soft8Soft.
2020-04-22 at 10:18 am #26350GLiFTeKCustomerWow. Super cool.
Will try it!
Thnx!Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-04-22 at 11:30 pm #26406GLiFTeKCustomerHI,
QUESTION,
i have it working on single objects.
curious as to wondering the reason why the top procedure won’t work and the bottom does here…here’s my changed code
app.ExternalInterface.setUnclickable = function (unclickable) { var myObj = app.scene.getObjectByName(unclickable); myObj.raycast = function() {}; console.log("UNCLICKABLE: ", unclickable); }
thnx
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-04-23 at 7:49 am #26438Ivan LyubovnikovStaffcurious as to wondering the reason why the top procedure won’t work and the bottom does
That’s because “get all objects from” already returns a list. I think it should work if you just plug it directly into the LIST_* variable.
Co-founder and lead developer at Soft8Soft.
2020-04-23 at 8:05 am #26439GLiFTeKCustomercurious as to wondering the reason why the top procedure won’t work and the bottom does
That’s because “get all objects from” already returns a list. I think it should work if you just plug it directly into the LIST_* variable.
That’s what I initially did.
My console log print of the LIST_ item when it’s made using those puzzles reads “Array (2)… “GROUP” and “Cylinder_Light_Collection” , which aren’t able to expand. So no contents just strings.Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-04-23 at 8:47 am #26445Ivan LyubovnikovStaffMy console log print of the LIST_ item when it’s made using those puzzles reads “Array (2)… “GROUP” and “Cylinder_Light_Collection” , which aren’t able to expand.
Oh, I guess you tried a puzzles setup that looks like this:
“set LIST…” <-> “Cylinders_Light_Collection”I actually meant that you can just drop the “create list” puzzle:
“set LIST…” <-> “get all objects from” <-> “Cylinders_Light_Collection”– have you tried that?
Co-founder and lead developer at Soft8Soft.
2020-04-24 at 6:28 am #26497GLiFTeKCustomerMy god…lol..
I HAD THAT… But after that, I combined that and another array(list) into one big list of unclickables. Guess I’ll just make them all be in one collection in blenderBut yea for one group (not combined groups/multiple arrays in one) that works. Alrighty Then!
Thnx
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature! -
AuthorPosts
- You must be logged in to reply to this topic.