Jump to content

GSFC_2

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by GSFC_2

  1. I think I complcated the issue by trying to change colors.

    The problem simplified  is this:
    I have a long slender box that I rotate with this line of code 

     self.entity:Turn(0,.5,0)

    Then I check for collisions with other objects.

    function Script:Collision(entity, position, normal, speed)    
        myname = entity:GetKeyValue("name")    
        System:Print(myname)
    end

    This prints the name of each object that collides with the long box.
    Works perfectly. 
    Once. 
    As the box rotates around and collides with the objects a second time nothing happens.

    I tried AggorJorn's code and it does the same as mine. It prints "Entered the trigger" and "Exiting the trigger" for each object once. Subsequent collisions are ignored.

    It appears after an object has recorded a collision something needs to be reset before the next collision.

    • Upvote 1
×
×
  • Create New...