Home › Forums › General Questions › Go to onclick position in First Person mode
- This topic has 11 replies, 5 voices, and was last updated 3 years, 10 months ago by zjbcool.
-
AuthorPosts
-
2020-01-03 at 4:11 pm #22539trunganhParticipant
Hi everyone,
I have a question that when in first person mode, is there anyway to when im click or touch screen, the camera moving to the position i click/touch.
I tried to make it but then i realize i just can’t.And anyway to switch from First person mode to Orbit mode by using Puzzle and html?
Thank you
2020-01-04 at 5:16 am #22552Yuri KovelenovStaff2020-01-06 at 2:34 am #22568trunganhParticipantHi,
the camera movement can be implemented with tween camera puzzle. The cameras can switched with the set active camera puzzle.https://viz4d.com/viewer/3d-villa-interactive-walkthrough
I want to make a archviz like this but the transition between camera are not smooth :(
2020-01-06 at 7:24 am #22572Yuri KovelenovStaffFirst you need to detect the point to which the camera will move to. It can be done with raycasting (via JavaScript):
https://cdn.soft8soft.com/demo/examples/index.html#webgl_geometry_terrain_raycast
Then you can move an invisible empty object to this point, preserving its height (also via JavaScript):
https://cdn.soft8soft.com/demo/examples/index.html#misc_controls_transform
Finally, you can use the tween camera puzzle to make the camera zoom onto this empty object (via Puzzles or via JavaScript):
https://www.soft8soft.com/docs/manual/en/puzzles/Camera.html#tween_camera
You can detect mouse clicks with Puzzles or JavaScript.
https://www.soft8soft.com/docs/manual/en/puzzles/Events.html#when_clicked
If needed, you can use both JS and Puzzles in the same app:
https://www.soft8soft.com/docs/manual/en/introduction/Using-JavaScript.html
2020-01-06 at 7:43 am #22573trunganhParticipantThank you, im looking on to it now
2020-01-06 at 9:00 am #22588trunganhParticipanti manage to make the object follow the mouse cursor without javascript
(i dont know anything about coding :( )but when im click on the plane, at first it work and then it looking to another direction
2020-01-06 at 9:48 am #22597trunganhParticipantFound another work around but im dont know to how make the cube 2 always behind cube 1 with fixed position
2020-01-08 at 8:01 am #22617Yuri KovelenovStaff2020-08-16 at 10:22 pm #31623janciParticipantHi Yuri and Trunganh, I am also interested in the same thing. Using a point and click navigation within Verge3D scenes. Something like Matterport and a few other existing solutions.
Can you please recommend a developer who could code this as a freelance job? Is this something that would be expensive to create?
Thank you.
Janci2020-08-17 at 4:50 am #31634Yuri KovelenovStaffHi,
you might reach one of the Verge3D experts, and/or post your cooperation proposal on this forum.
2021-02-22 at 1:17 pm #38792seb2000Customerhello does he perform a demo scene with a first person move?
2021-02-22 at 2:22 pm #38795 -
AuthorPosts
- You must be logged in to reply to this topic.