Jump to content

check if an entity still collides with another


Andy90
 Share

Recommended Posts

Hello :)

I would like to inquire if it's possible to use an Lua function to determine if one entity collides with another. My objective is to verify whether the player remains within a trigger area. At present, I accomplish this by setting a boolean variable to true in the event of a collision with the player using Script:Collision. Then, in Script:UpdatePhysics(), I repeatedly reset this variable to false.

Link to comment
Share on other sites

Thanks for the anwesers. 

On 10/3/2023 at 2:59 AM, Alienhead said:

Check out AABB.

i will check this :)

 

 

On 10/3/2023 at 3:17 AM, reepblue said:

If it's physics related, use the Collision function instead of UpdatePhysics Use the entity argument to filter what entity or type it needs to trigger your event.

yeah i set a boolean variable to true within the method and set it to false within UpdatePhysics. So at the moment its working fine. 

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.

 Share

×
×
  • Create New...