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

    SetLife at n-collision for tp

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 656 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 21/05/2012 at 09:53, xxxxxxxx wrote:

      Hello to all
      I have problem with understanding of how to catch/detect and kill at n-collision tp(id).
      scene(from my colleague) - link
      and code(at tag) :

          
          
          import c4d
          from c4d.modules import thinkingparticles as tp
          
          def main() :
              curframe = doc.GetTime().GetFrame(doc.GetFps())
          
              N = tp.NumParticles()
              ids = range(N)    
              if curframe == 0 :
                  ids = range(N)
                  life = [c4d.BaseTime(0.0)]*N
                  map(tp.SetLife,ids,life)
              else :
                  ids = range(N)
                  for i in ids :
                      if tp.Alive(i) :
                          col = tp.SetCollision(i, 10) 
                          print col
                          if col :
                              ids = range(N)
                              life = [c4d.BaseTime(0.0)]*N
                              map(tp.SetLife,ids,life)
      
      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 22/05/2012 at 07:38, xxxxxxxx wrote:

        it does not documented in help, but seems works:

        tp.CheckCollision(0, i, curframe, tp.Position(i), tp.Velocity(i), tp.Spin(i)["axis"], tp.Spin(i)["speed"], dt, ct)
        

        how to catch dt and ct?

        up.
        dt = curframe - 1

        ct?

        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 22/05/2012 at 23:48, xxxxxxxx wrote:

          i guess dt stands for deltatime und ct for currenttime.

          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 23/05/2012 at 12:04, xxxxxxxx wrote:

            Thanks Ferdinand.
            So, that boolean function works for sequences with GetVirtualObjects(...) and gv-interface.

            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 24/05/2012 at 11:10, xxxxxxxx wrote:

              I downloaded new documentation of pyDocs, expecting explanation that function will be 😉
              Sebastian, please, will be it?

              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 25/05/2012 at 01:21, xxxxxxxx wrote:

                It's intended that TP_MasterSystem.CheckCollision() isn't documented. This function is private.

                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 25/05/2012 at 07:40, xxxxxxxx wrote:

                  Muchas gracies. Thank you.
                  Hope it will be more public. 😉

                  Also thanks for docs to Maxon's devs

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