• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum
    • Categories
    • Recent
    • Popular
    • Tags
    • Register
    • Login

    game programing

    How To... ?
    5
    5
    179
    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

      WolandW jfgJ 2 Replies Last reply Reply Quote 1
      • WolandW
        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 3.2.6 | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

        DusXD 1 Reply Last reply Reply Quote 0
        • DusXD
          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 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

          1 Reply Last reply Reply Quote 1
          • jfgJ
            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 14.1 Sonoma:
            - 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_mM 1 Reply Last reply Reply Quote 2
            • mark_mM
              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
              PC Specialist Desktop: i9-14900K, RTX4070Ti, 64GB RAM, Win11Pro
              www.natalieinsideout.com

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