Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Point on the XZ-plane that the mouse is over

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 396 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post