Jump to content

Recommended Posts

Posted

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

Posted

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 =)

trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
Posted

would changing the physics shape from convex hull to polymesh work for you

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!

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.

×
×
  • Create New...