drag hotspot along 3D hittestarea

  • Hi all,

    could someone help solve my math puzzle for dragging hotspots in 3d space like in Klaus' Abu Simbel example, but along "flat" hittestareas, not in spherical motion?

    Based on Klaus' example for vrhittesting (xml) I'm adding hotspots at the hitpoint position (red dot) in 3d space and get tx, ty, tz, and ath values of the hittestareas for the hotspots. I then would like to drag the hotspots along the corresponding hittestarea (considering the tx, ty, tz and ath values).

    How does the math need to be adjusted in Klaus' Abu Simbel dragging code below?
    Is it a different coordinate transformation than in this example or a different tx/ty/tz calculation?


    I get good results for dragging along the hittestarea, but only close to the initial hotspot position, if I put the hittestarea tz or tx value as "z" or "x" in the beginning of the asyncloop, depending on ath (for 0/180 or for -90/90) of the hittestarea, but the further away the hotspot gets dragged from its initial position, the more the dragging effect decreases, because it still tries to go spherical I guess.

    Does someone have an advise please?

    Einmal editiert, zuletzt von loki (20. Januar 2022 um 02:36)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!