• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    game programing

    How To... ?
    5
    5
    112
    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.
    • C
      carolina last edited by

      Hi! I found this video and I would like to do something like this. But i dónt know how to make the part where the coin meets the pot and it adds to the score. Can someone help?

      https://vimeo.com/565138396

      Woland jfg 2 Replies Last reply Reply Quote 1
      • Woland
        Woland Tech Staff @carolina last edited by

        @carolina

        I don't have a VIMEO account so I can't view the video, but if it's 2D object collision detection you could look at @Dusx and @GertjanB's answers on this post: https://community.troikatronix.com/topic/6816/answered-2d-collision-detection-advice/6?_=1672833713872 

        TroikaTronix Technical Support
        New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        TroikaTronix Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
        TroikaTronix Add-Ons Page: https://troikatronix.com/add-ons/

        | Isadora 2.6.1 + 3 | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s | Macbook Pro (Retina, 15", Mid 2015), macOS 10.11.4, 2.8GHz Intel Core i7, 16GB RAM, Intel Iris Pro 1536 MB |

        DusX 1 Reply Last reply Reply Quote 0
        • DusX
          DusX Tech Staff @Woland last edited by

          @carolina Yes, as Woland has suggested you need to use some form of collision detection. The easiest would be a point to rect collision. In this case you would use the center of the coin (its X Y position) and check every frame if its position is between two X  positions and between two Y positions, so within a Non Rotated Rectangle (your pot in this case).
          If it is in the 'pot' then you would trigger an addition to the score, the end of the current coins life, and the start of the next coin (or something like that)
          A failing case might be that the coin is below a certain threshold and isn't in the pot.

          this demo file might help you get started: https://community.troikatronix...

          Troikatronix Technical Support

          • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
          • Isadora Add-ons: https://troikatronix.com/add-ons/
          • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

          Running: Win 10 64bit, i7-8750H, M.2 PCIe SSD's, 16gb DDR4-2666, nVidia GTX 1070 | located in Ontario Canada.

          1 Reply Last reply Reply Quote 1
          • jfg
            jfg @carolina last edited by

            @carolina

            here a way to make what you want:

            game.zip

            best regards, Jean-François 

            • Izzy 3.2.6, Mac OS 13.2 Ventura:
            - MacBook Pro M1 Max 16" 64GB RAM
            • Izzy 3.2.6, Mac OS 10.14.6 (Mojave):
            - Mac Pro 5.1 middle 2012 (3,33 GHz 6-Core Intel Xeon, 32GB RAM, Radeon RX 580 8 GB )
            - MacBook Pro 2015 (16GB RAM) 2,8 GHz Intel Core i7;

            Located in Bremen, Germany

            mark_m 1 Reply Last reply Reply Quote 2
            • mark_m
              mark_m @jfg last edited by

              @jfg

              Nice, thank you!

              Intel NUC8i7HVK Hades Canyon VR Gaming NUC, i7-8809G w/ Radeon RX Vega M GH 4GB Graphics, 32GB RAM, 2 x NVMe SSD
              Gigabyte Aero 15 OLED XD. Intel Core i7-11800H, NVidia RTX3070, 32GB RAM 2 x NVMe SSD
              Homebrewed X99 Desktop, i7 5930, GeForce GTX980, 64GB RAM, Win10x64
              www.natalieinsideout.com

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