Jump to content

Only call collision handler once during overlap period?


Boxtufty
 Share

Recommended Posts

Simple check solved it, sorry for excellent thread. Remove if you like.

Scenario: I have two entities, when they overlap a handler function executes it's statements.

 

Problem: This collision handler keeps getting called every tick for the duration that the entities are overlapping. I only want it to call once, and then chill out.

 

Mindless rambling: I think this is a matter of logic, like a simple boolean check should solve it.

 

edit: Yep. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...