Jump to content

Collision groups ?


YouGroove
 Share

Recommended Posts

It is possible in some engines to sepcify some sort of layers for example.

Like Entity of Layer 1 will not collide with those of layer 2.

 

I must use physic as i need walls and physic objects collision.

I would need such system to not have physic missiles of player colliding with missiles of others NPC.

 

It is possible in Leadwerks 3.1 to have some sort of groups of collison ?

Stop toying and make games

Link to comment
Share on other sites

As missiles will go direct forward only for now one solution could be :

-Missiles with no physics

-Use Raycasting when a missille is launched to determine the final point of collision.

-And just make it move along the line and detect collision using distance based or box/box collision with the entity i want like Player or NPC.

 

The advantage is perhaps saving CPU as no collision detection is needed each frame for all missiles, raycasting having been called at missile start.

Stop toying and make games

Link to comment
Share on other sites

Couldn't find the documentation for it however in C++ it's...

 

PhysicsDriver::GetCurrent()->SetCollisionResponse(Collision::whatever, Collision::Scene, 0);

 

The zero enables/disables collision.

 

you can also create your own collision types as they are just a numeric value. I think I started mine at 10 just in case Josh adds more default types later on.

trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
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...