xtreampb Posted February 9, 2016 Share Posted February 9, 2016 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? Quote 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 More sharing options...
Brutile Posted February 9, 2016 Share Posted February 9, 2016 You can define your own collision types http://www.leadwerks.com/werkspace/topic/11744-defining-new-collision-constantstypes/#entry84834 And yes, the 'prop' object would collide with 'debris' according to the collision chart Quote Link to comment Share on other sites More sharing options...
Brutile Posted February 9, 2016 Share Posted February 9, 2016 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) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.