IronHunter Posted December 11, 2020 Share Posted December 11, 2020 (edited) I have a child entity prefab that I want to always take priority for mouseovers from its parent entity prefab. I am having a difficult time enforcing this, as the parent entity seems to take priority for mouseovers. I have tried: SetSortOrder, SetFinalOffset SetRayTestOnBB Its a very simple child prefab attached to a parent prefab, if there is any suggestions. Think of this child entity like a button attached to another object. Edit: Thank you @CarlZalph for his solution this did the trick for me. local Mouser = function(entity) local ents = GLOBAL.TheInput.entitiesundermouse local entc = #ents for i=2, entc do local ent = ents[i] if ent and ent.prefab == "somechild" then return true end end return false end Parent: inst.CanMouseThrough = Mouser Edited December 11, 2020 by IronHunter 1 Link to comment https://forums.kleientertainment.com/forums/topic/124768-mouseover-layering-solved/ Share on other sites More sharing options...
CarlZalph Posted December 11, 2020 Share Posted December 11, 2020 Solution came to me after reading over input.lua's OnUpdate function seeing how it was handling the entities under the mouse. Idea was to make it so that the 'parent' will let itself go transparent to the mouse so long as the target child entity is also under the mouse thereby forcing the child to take highest priority over the parent when mouse hovering. 1 1 1 Link to comment https://forums.kleientertainment.com/forums/topic/124768-mouseover-layering-solved/#findComment-1404679 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now