Jump to content

Disable/Remove collision object in Lua


YouGroove
 Share

Recommended Posts

In game could be great by one function call to remove or disable collisions in Lua.

Can be used on dead ennemies to see them on floor but with no more collision , you pass trhough.

Usefull specially performance saving if you have a lot at screen.

Or could be used to have some character be able to pass throught walls if we could enable/disable collision as we need (enabling working only on valide empty space)

Stop toying and make games

Link to comment
Share on other sites

I already told you how to do it and it is 1 function smile.png

 

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/collision-r778

 

self.enitty:SetCollisionType(Collision.None)

 

 

Collision.None reverts to just a number. You can put whatever number that isn't already defined in the above doc and it'll do the same thing since no collisions are setup for numbers that aren't defined in the above doc.

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...