MasterK Posted August 1, 2016 Author Share Posted August 1, 2016 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~~ Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 1, 2016 Share Posted August 1, 2016 @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 Quote Link to comment Share on other sites More sharing options...
Nockawa Posted August 1, 2016 Share Posted August 1, 2016 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! Quote Link to comment Share on other sites More sharing options...
MasterK Posted August 1, 2016 Author Share Posted August 1, 2016 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? Quote Link to comment Share on other sites More sharing options...
MasterK Posted August 1, 2016 Author Share Posted August 1, 2016 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 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. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted August 1, 2016 Share Posted August 1, 2016 2 minutes ago, MasterK said: 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? Quote Link to comment Share on other sites More sharing options...
MasterK Posted August 1, 2016 Author Share Posted August 1, 2016 2 minutes ago, Nockawa said: Have you tried to set the cameraToUseForPointers property in the Scene class? Tried now... http://www.babylonjs-playground.com/#1X37TG#14 Good !~ I just reply him first.. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted August 1, 2016 Share Posted August 1, 2016 1 hour 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~~ I tried to reproduce your issue but couldn't I don't have a pointer event thrown if I click on the part of the sprite that is outside. Quote Link to comment Share on other sites More sharing options...
HenryPeng Posted August 1, 2016 Share Posted August 1, 2016 19 minutes ago, Nockawa said: I tried to reproduce your issue but couldn't I don't have a pointer event thrown if I click on the part of the sprite that is outside. @Nockawa here is an exmaple http://www.babylonjs-playground.com/#17SO3P#0 you can find the issue Quote Link to comment Share on other sites More sharing options...
Nockawa Posted August 1, 2016 Share Posted August 1, 2016 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? Quote Link to comment Share on other sites More sharing options...
Nockawa Posted August 1, 2016 Share Posted August 1, 2016 Ok, the bug is fixed, the PR is submitted. Quote Link to comment Share on other sites More sharing options...
MasterK Posted August 2, 2016 Author Share Posted August 2, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.