- This topic has 5 replies, 2 voices, and was last updated 4 years, 6 months ago by Angel del Amo.
-
AuthorPosts
-
2020-06-15 at 5:54 am #28836Angel del AmoCustomer
Hi all,
I’ve placed objects on a scene giving coordinates, and then let the user to drag the objects to the correct place of a plane. But I’m trying to have the objects placed directly by the user in the desired position by the client (that is, by clicking in the plane). Is there any way to get x y z position of the place where the mouse is clicked on an object?
also I’m looking in the js reference examples, to see if it can be done with raycast… but in this moment any of the webgl examples are working for me, browsers console give the error “v3d is not defined”…
thanks in advance!
2020-06-16 at 8:28 pm #28908Angel del AmoCustomerHi… any help with this would be really appreciated.
Are the webgl examples webs working for you correctly? I can only see backgrounds in all of them, and I’ve tried in chrome-firefox-edge on different pc- laptops…https://cdn.soft8soft.com/demo/examples/index.html
thanks!
2020-06-17 at 10:19 am #28925GLiFTeKCustomerHi,
First, if the places they the user can click the object to are specific, or on a grid, you can make invisible (transparent clip material) objects then use “snap to object puzzle”Second, if it’s any pixel on the screen they can put it then I’d try the client X and clientY options in the “on event of” HTML Puzzles, use in”body” and get target value to retrieve the coordinates to put in the “set object” (position to.
Mouse clientX clientYHope that helps
(I’m doing same thing )Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-17 at 12:51 pm #28932Angel del AmoCustomerThanks for your answer GlifTek… at this moment I was trying with pagex pagey, fixing the camera in a top view. But depending on the size of the client’s area its more or less accurate.
for now, it’s enoguh for me, but I would like to have also working in first person view for furniture placing… I would like to have a try with raycaster, as in the NASA vechicle demo. Could you kindly please confirm me if Verge examples web is working for you? https://cdn.soft8soft.com/demo/examples/index.html#webgl_geometry_terrain_raycast For same reason its not loading for me…
thanks!!
best regards!!2020-06-20 at 4:22 am #29021GLiFTeKCustomerHaven’t checked your link yet (will when I’m at desktop)..
Here’s some more info I posted on grid snapping if you haven’t seen…
Link to grid snapping explanation
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-06-20 at 7:07 am #29023Angel del AmoCustomerThanks Gliftek… link to examples are working again, I’ll see if I can advance with raycast to place things at intersection point and let you know (Im newbie with js, just 3d knowledge).
Alsto thanks for the grid explanation, I’ll look to it right now
-
AuthorPosts
- You must be logged in to reply to this topic.