Jump to content

Physics Types


xtreampb
 Share

Recommended Posts

So based off the documentation found at http://www.leadwerks.com/werkspace/page/api-reference/_/command-reference/collision-r778 I set a 'floor' to be of type debris and my sphere brush to be type prop, the brush shouldn't fall through right? That is what i'm experiencing and wonder if it is because i am using a character controller instead of a ridged body. If i set the 'floor' to be of type scene and my brush to be of type character, works as expected.

 

Is there as way to define my own collision types and how they should interact with the existing ones?

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Link to comment
Share on other sites

The example you specified would look like (you don't need the comments, but I use them so I know which is which):

 

--brush prop = 10
Collision:SetResponse(10, Collision.Debris, Collision.Collide)

 

Just list them out as you need them. By default they should all be set to Collision.None, so you don't need to write them all out, but sometimes it helps to understand what is colliding and what isn't.

 

Then assign the type to your object:

 

self.entity:SetCollisionType(10)

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