Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

3D entity with hoverText not working when UI element is instantiated without isPointerBlocker=false #2357

Open
pabloes opened this issue May 12, 2021 · 0 comments

Comments

@pabloes
Copy link

pabloes commented May 12, 2021

const entity = new Entity();
entity.addComponent(new BoxShape());
entity.addComponent(new OnPointerDown(()=>{},{hoverText:"foo"}));
entity.addComponent(new Transform({
  position: new Vector3(8,2,8)
}))
engine.addEntity(entity)

const canvas = new UICanvas()
const message = new UIText(canvas);
//message.isPointerBlocker = false;

Having this code, hoverText on 3D entity doesn't work unless the UIText instance has isPointerBlocker = false;
Same happens with other UI classes like UIContainerRect;
Only happens when the elements are on center, it doesn't happen once you displace it, e.g. positionX=-100;

If it's not a bug I leave this here for reference at least.
I don't know if by design, for some reason, the pointer blocking should not affect only UI but also 3D entities

  "devDependencies": {
    "decentraland-ecs": "^6.6.5-20210511164141.commit-32abf43"
  }
@pabloes pabloes changed the title 3D entity with hoverText not working when UI element is instantiated on center of screen without isPointerBlocker=false 3D entity with hoverText not working when UI element is instantiated without isPointerBlocker=false May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant