Rick Posted July 20, 2013 Posted July 20, 2013 I need a collision to be fired, but not cause a physical effect of stopping things from moving through it. This needs to happen for both characters and any other shapes. I couldn't seem to get any of the pre-defined collision types to do this. Either they fire with character but not other shapes, or they fire with both but physically stop the object from going through them. I see there is a SetCollisionType(), but it doesn't seem to be like in LE2 where I can determine if it should have a physical effect or not. There must be a way to do this right? http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetcollisiontype-r35 Quote
tjheldna Posted July 21, 2013 Posted July 21, 2013 enum { kCollisionProjectile = 6, kCollisionEnemyAI = 7, kCollisionCorpse = 8 }; PhysicsDriver::GetCurrent()->SetCollisionResponse(kCollisionProjectile, Collision::Scene, 1); PhysicsDriver::GetCurrent()->SetCollisionResponse(kCollisionProjectile, Collision::Prop, 1); PhysicsDriver::GetCurrent()->SetCollisionResponse(kCollisionProjectile, kCollisionEnemyAI, 1); PhysicsDriver::GetCurrent()->SetCollisionResponse(kCollisionProjectile, Collision::Trigger, 0); PhysicsDriver::GetCurrent()->SetCollisionResponse(kCollisionProjectile, Collision::Character, 0); PhysicsDriver::GetCurrent()->SetCollisionResponse(kCollisionProjectile, kCollisionProjectile, 0); done =) Quote
Rick Posted July 21, 2013 Author Posted July 21, 2013 Ah ok. I'll see if this works in Lua. Thanks and disregard my other question about this in the other post. Quote
Rick Posted July 21, 2013 Author Posted July 21, 2013 OK, got around this by just adding it to the cpp code instead of doing it in Lua. All good. It's really coming together now! Quote
xtreampb Posted July 22, 2013 Posted July 22, 2013 would changing the physics shape from convex hull to polymesh work for you 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!
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.