giorgi abashidze Posted November 14, 2017 Share Posted November 14, 2017 hi everyone,I want to get x and y from ground when I click and where I click to do click to move. I tried this but it not working to me: P.S scene.meshes[1] is a ground var pickInfo = scene.meshes[1].pick(ev.clientX,ev.clientY); error: Object doesn't support property or method 'pick' Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 14, 2017 Share Posted November 14, 2017 The pick function is a member of the scene (and not of a mesh). It provides back PickingInfo (http://doc.babylonjs.com/classes/3.1/pickinginfo) object with the needed data GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
giorgi abashidze Posted November 14, 2017 Author Share Posted November 14, 2017 3 hours ago, RaananW said: The pick function is a member of the scene (and not of a mesh). It provides back PickingInfo (http://doc.babylonjs.com/classes/3.1/pickinginfo) object with the needed data I fixed this but my object moving like this. there is no method that gets desired and current location and makes object to move smoothly? Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 14, 2017 Share Posted November 14, 2017 Of course there is! Animations are your friends - http://doc.babylonjs.com/babylon101/animations Quote Link to comment Share on other sites More sharing options...
giorgi abashidze Posted November 14, 2017 Author Share Posted November 14, 2017 42 minutes ago, RaananW said: Of course there is! Animations are your friends - http://doc.babylonjs.com/babylon101/animations mm things geting harder .. :))) thanks Wingnut 1 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.