Point on the XZ-plane that the mouse is over
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/05/2010 at 21:57, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R11.5
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;---------
Hi, I'm trying to retrieve the world coordinates of a point on the XZ ground plane, while in perspective view, that my mouse is over. What would be a good way to go about achieving this. I've tried basedraw->SW() but haven't been able to work out a method of calculating the value I would need for the z coordinate of the argument.TIA
JDP -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/05/2010 at 12:01, xxxxxxxx wrote:
I solved it by doing Ray, Plane intersection test. If anyone has a better way of doing this please feel free to chime in.
Cheers.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/05/2010 at 01:42, xxxxxxxx wrote:
Just use SW() with 500.0. This value is used internally by most tools in CINEMA 4D.
For instance, from the liquidtool.cpp example.
bd->SW(Vector(mx,my,500.0)
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/05/2010 at 02:24, xxxxxxxx wrote:
Hi Matthias, I need to retrieve the x and z world coordinates when y = 0 so a constant won't work if I understand how the function works. I also want to be able to do this for XY and ZY planes.
Thanks.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/05/2010 at 02:54, xxxxxxxx wrote:
Please have a look at this thread which is basically about the same issue.
https://developers.maxon.net/forum/topic/4394/4001_mouse-imput-in-camera-view
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/05/2010 at 03:07, xxxxxxxx wrote:
Thanks for your reply Matthias. This is actually what I ended up doing but in a slightly different way.
Cheers.