Jump to content

the worldSpaceCanvas can't use pointEvent in ORTHOGRAPHIC_CAMERA


MasterK
 Share

Recommended Posts

23 minutes ago, Nockawa said:

I'm not sure to understand, you'd like the left part of the sprite (the one that is off the canvas) to be clickable? If so, I'm afraid this is not the behavior that I'd like.

As always a little PG would help. For me the clipped part is "gone" you can't do anything with it.

I mean what you mean.

I don't want left part clickable. but it does... We'll make PG case for you later~~

Link to comment
Share on other sites

44 minutes ago, MasterK said:

I mean what you mean.

I don't want left part clickable. but it does... We'll make PG case for you later~~

Ok, I understand now, and yes indeed you're right, the intersection test is pure logical intersection with the prim and clipping is not considered. Right now I'm a little bit scared about how I could solve this issue...I can't see an easy solution...

Edit: The easy solution is to also make an intersection test with the WSC bounding Rect and reject if it returns false. Ok, So It's not really hard thing to do after all!

Link to comment
Share on other sites

12 minutes ago, Nockawa said:

Ok, I understand now, and yes indeed you're right, the intersection test is pure logical intersection with the prim and clipping is not considered. Right now I'm a little bit scared about how I could solve this issue...I can't see an easy solution...

Modify BindInfo is OK?

I see bindInfo is only for pointer event check?

Link to comment
Share on other sites

34 minutes ago, Nabroski said:

@HenryPeng

@MasterK

Yes, its is possible, i currently out of time, to make a pg. but its a question of logic

always pushing cameras, can become quite confusing very fast.

http://www.babylonjs-playground.com/#1X37TG#13

Hope you find quickly a solution, that fits for your task! 

Best

:unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure:

You just teach me how to change camera... But my need is two camera, world UI and 3d mesh above  exists same time.

Maybe we could handle all pointer event in screen canvas.  That's a worse choice.

Link to comment
Share on other sites

2 minutes ago, MasterK said:

:unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure::unsure:

You just teach me how to change camera... But my need is two camera, world UI and 3d mesh above  exists same time.

Maybe we could handle all pointer event in screen canvas.  That's a worse choice.

Have you tried to set the cameraToUseForPointers property in the Scene class?

Link to comment
Share on other sites

9 minutes ago, HenryPeng said:

@Nockawa  here is an exmaple http://www.babylonjs-playground.com/#17SO3P#0

you can find the issue

@MasterK was saying it was a WorldSpaceCanvas that wasn't working as expecting, but by looking at  your sample it's the opposite, right? The WorldSpaceCanvas is working as expecting but not he ScreenSpace one, right?

 

Link to comment
Share on other sites

12 hours ago, Nockawa said:

@MasterK was saying it was a WorldSpaceCanvas that wasn't working as expecting, but by looking at  your sample it's the opposite, right? The WorldSpaceCanvas is working as expecting but not he ScreenSpace one, right?

 

Anyway there's a bug. Thanks for fixing fast~ I think Canvas2D is almost O.K.

;););););););););)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...