# How do you translate movement around the Canvas3D to movement within the virtual three dimensional world

Let me move a shape within the virtual world in a way to ensure that it eventually ends up in which the mouse pointer is around the canvas.

Things i have: -mouse position (x,y) on the Canvas3D object -Point3d object of in which a pick ray beginning in the Canvas3D viewport intersects using the first scene object. (reason for three dimensional space of where i wish to start the drag)

Things i want: -A way to translate the Point3d's coordinates to ensure that the first reason for intersection (the Point3d object) is definitely overlapping the a button position around the canvas (just like after i used the pick ray to determine which the consumer clicked on on in the Canvas3D object).

Thanks!

It may sound as if you wish to make use of the plane that is parallel towards the background plane and consists of the intersection point using the object. This can be used plane even if a button moves past the actual background as it is only a mathematical concept which stretches to infinity.

I am not really a Java programmer and so i can't provide you with code but I'm a math wizzard so here's equation you'll need )

Let P denote the initial intersection point and call the backdrop plane unit normal n. This normal can also be the standard in our plane of great interest. Let R denote a place around the ray and l denote it's unit direction vector.

Then your equation from the plane is (x-P).n = for any point x within the plane (the . denotes us dot product of two vectors). The equation of the point around the ray is x = R + t*l where t is any real number. The ray therefore intersects the plane when

(t*l + R - P).n =

i.e. when

t = (P - R).n / ( l.n )

This provides a t value to plug back to your ray equation to own intersection point.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9126773,"math_prob":0.9679301,"size":1850,"snap":"2019-43-2019-47","text_gpt3_token_len":410,"char_repetition_ratio":0.12892741,"word_repetition_ratio":0.0,"special_character_ratio":0.22378379,"punctuation_ratio":0.06043956,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9891053,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-12T21:43:02Z\",\"WARC-Record-ID\":\"<urn:uuid:f301b739-d5ac-4364-8e40-369a7cf9eb21>\",\"Content-Length\":\"12448\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1e7fb042-8577-4fe5-aadf-9f2633defe0a>\",\"WARC-Concurrent-To\":\"<urn:uuid:7d3ab99e-4eb6-476a-a33d-a4ba8ebcc62a>\",\"WARC-IP-Address\":\"185.176.40.57\",\"WARC-Target-URI\":\"http://codeblow.com/questions/how-do-you-translate-movement-around-the-canvas3d-to-movement-within-the/\",\"WARC-Payload-Digest\":\"sha1:IA2OQUVJNQWDMLWCYA5JIMOJLDZTC5ME\",\"WARC-Block-Digest\":\"sha1:L4WSSHEGTD3JW65EM7J3E4UDVZBYKLMH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496665767.51_warc_CC-MAIN-20191112202920-20191112230920-00482.warc.gz\"}"}