We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

How to Implement Raycast-Based Timeline Pointer Selection Using HTML Puzzle

Home Forums General Questions How to Implement Raycast-Based Timeline Pointer Selection Using HTML Puzzle

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #82011
    amrita
    Participant

    Hello Verge3D team and community,

    In an e-learning application, I’ve created a timeline using the HTML section of the Verge3D puzzles. I would like to implement a feature where a pointer or marker is placed on the timeline wherever the user clicks, similar to the functionality shown in the reference image, where a raycast is used to determine the click point.

    Could you please guide me on how to achieve this same behavior with my custom HTML-based timeline? Specifically, I’m looking to capture the user’s click position on the timeline and update the pointer position accordingly using Verge3D puzzles.

    Any help or example implementations would be greatly appreciated.

    Thank you!

    • This topic was modified 7 hours, 45 minutes ago by amrita.
    Attachments:
    #82017

    Hi,

    You might use “click” handler to obtain “offsetX” with the relative position of the click point. Then you can divide this value by the div element size to get progress/timeline ratio (percentage).

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #82023
    amrita
    Participant

    hello,
    I’m trying to set the left CSS property for an HTML element, but it’s not positioning as expected. Could you guide me on the correct approach to accurately set the left value when working within the Verge3D environment?

    Attachments:
    #82025

    This should work. Check out the “left” property is actually set in the Chrome console. Also, the element should have the “position” prop set to “absolute” or “relative”.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.