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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Return Mouse XYZ coordinates

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 444 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

      On 07/05/2017 at 11:00, xxxxxxxx wrote:

      Hi Everyone!
      I am struggling on how to get the Mouse Coordinates in the Viewport.
      I can get the screen coordinates using the **GetLong(c4d.BFM_INPUT_X) and  ** GetLong(c4d.BFM_INPUT_Y)
      But is there a way to get the projection XYZ coordinates in the ViewPort?

      Thank you.

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

        On 10/05/2017 at 10:53, xxxxxxxx wrote:

        I hardly suggest you to read the documentation. Everything is explained.

        https://developers.maxon.net/docs/py/2023_2/modules/c4d/C4DAtom/GeListNode/BaseList2D/BaseView/index.html?highlight=baseview#BaseView.GetViewParameter

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

          On 12/05/2017 at 03:49, xxxxxxxx wrote:

          Hello,

          what exactly is the context of your question? Are you working on a tool? Mouse coordinates are always just X and Y. What kind of Z coordinate are you looking for? The BaseView class includes various functions to transform coordinates across Screen-, Camera- and World space, e.g. BaseView.WS().

          best wishes,
          Sebastian

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