GameMonetize Posted June 22, 2015 Share Posted June 22, 2015 Could you provide a live sample somewhere? Quote Link to comment Share on other sites More sharing options...
dsman Posted June 22, 2015 Share Posted June 22, 2015 @bulisor Thanks for the reply . Yes I understand if canvas size doesn't match window size , it will create the problem. In that case we have to use offset property of the canvas to find canvas's position in the page/screen and add that to the resulting x and y from project function. @deltakosh sorry for kind of wasting time. But I did nothing and now it is just working fine. I literally did nothing. I was debugging earlier and I've shown here the output values. But last night it was working all fine. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 22, 2015 Share Posted June 22, 2015 Sometimes cache issues lead to this Quote Link to comment Share on other sites More sharing options...
wladimiiir Posted March 9, 2016 Share Posted March 9, 2016 On 10/7/2014 at 2:22 AM, Deltakosh said: Live: http://www.babylonjs.com/playground/#UWSIL#1 This should still work, right? Because I am getting NaN for x and y of the result. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2016 Share Posted March 11, 2016 Here is the fix: http://www.babylonjs-playground.com/#UWSIL#11 (toGlobal takes with and height now) Quote Link to comment Share on other sites More sharing options...
wladimiiir Posted March 13, 2016 Share Posted March 13, 2016 Thank you. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted November 22, 2016 Share Posted November 22, 2016 Sorry to dig up the past, but I am having trouble with this... I keep getting NAN on the output for the x and y and like 0.99128973981728937 for the z no matter what I do... Also the example at http://www.babylonjs-playground.com/#UWSIL outputs NAN as well to the console, so me thinks something is not working correct.@Deltakosh #Bug? Nevermind got the fix! ok why do we need to pass the width and height when we were already passing the engine in the old version which has this information? I feel like more lines in a constructor why? Just wondering why things changed? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 23, 2016 Share Posted November 23, 2016 We changed it because of viewport can be used on rendertexture as well (with different width and height) 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.