Sign in to follow this  

set pointer coordinate for gui observable

Recommended Posts

I changed the scale of my rendering canvas but the pointer coordinate somehow gets messed up. how can i set the pointer coordinate for buttons,  here's my code:

var coord = new BABYLON.Vector2(scene.pointerX/4, scene.pointerY/4).normalize() button1._onPointerDown = function(button1, coord){ console.log(coord) }


or is there a set function for this control.getLocalCoordinates(coordinates) something like control.setCoordinates(new coordinates)?

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.