YouGroove Posted April 16, 2014 Share Posted April 16, 2014 I use bullets and ships with physics, they are of collision type "Prop" , player and bullets and ennemies ar all "prop" I would need only some category of "prop" collision to collide with another category and not with others. All ennemies Ships of type "prop" to not collide between them Bullets of ennemies of type "prop" not collide with ennemy ships of type "prop" It is possible in LE3 to have some sort of Layers collision for objects of type "prop" ? LE3 have several type of collision, and the type can go to number 99 Can we give our own number ? TypeCollision = 80 ? And how it would collide or not with TypeCollision = 90 ? How to define it ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
SlipperyBrick Posted April 17, 2014 Share Posted April 17, 2014 Or not delete, that is the question Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 17, 2014 Author Share Posted April 17, 2014 Not to delete 1 Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted April 17, 2014 Share Posted April 17, 2014 Can we give our own number ? I know you can do this in a C++. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetcollisiontype-r35 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 17, 2014 Author Share Posted April 17, 2014 I know Rick. But i seen no tutorial on showing how to make groups ? Even if you give numbers using SetCollisionType How you do to say to collision system : - CollisionType(80) can collide with CollisionType(90) - CollisionType(80) can't collide with CollisionType(85) How to do that ? Does i missed some function or step ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted April 17, 2014 Share Posted April 17, 2014 Sorry, I linked to the wrong function. There is a function I think called Collisions() that does what you're after. 1 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 17, 2014 Author Share Posted April 17, 2014 Thanks. I dind't find it ? It is Lua ? or again did i miss it in Command Reference docs ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted April 17, 2014 Share Posted April 17, 2014 I think it's only available in C++. I don't see it in the docs. I know the old C++ template used to have it, but it doesn't appear to have it now. I can't remember for the live of me what class it's tied too. Checking... In 2.x it was just called Collisions() I think. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 17, 2014 Author Share Posted April 17, 2014 Don't waste to much time seeking it, as i needed it with Lua.Thanks. Ok so in Lua this is not possible. I'm not spamming 3D engines, but i wanted LE3 to have something similar to Unity to manage collisions. https://docs.unity3d.com/Documentation/Components/LayerBasedCollision.html This bring lot of things and gameplay possibilties could it be : - bullet ennemies not colliding ennemy ships - bullets player and ennemie bullet not colliding - special laser gun going throught walls but not players - player special ability to go throught walls when power up etc ... Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted April 17, 2014 Share Posted April 17, 2014 The current system works like layers but it's not called layers. Just need to find that Collisions() function and expose it to Lua if it's not already. The concepts are basically the same anyway. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted April 17, 2014 Share Posted April 17, 2014 http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/entity/entitysetcollisiontype-r35 There's a Lua example for it. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 17, 2014 Author Share Posted April 17, 2014 @Gamecreator : I'm aware of LE3 collision basc types : with "prop", "debris","scene" I have physic objects moving , all are type "Prop" and i need some "prop" types to collide with some others and not others. So you need some layer system. In gameplay terms : Ennemy ships of collision type "props" not colliding between themselves, only with player bullets and ship that are also "prop" type Actually any "prop" type collision will collide with any other "prop" type so that's not possible. In programmin terms : - CollisionType(80) can collide with CollisionType(90) - CollisionType(80) can't collide with CollisionType(85) Quote Stop toying and make games Link to comment Share on other sites More sharing options...
josk Posted April 17, 2014 Share Posted April 17, 2014 Cant you set collsion for bullets self.entity:SetCollisionType(99) and then use if collisiontype~=99 then blah blah end and have bullets as 99. Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
Rick Posted April 17, 2014 Share Posted April 17, 2014 Where would you put that if collisiontype statement to check? You can't put it in the Collision() function because it won't get called unless you already setup collisions in another function (that we are trying to find). You would have to manually do your own collision checks, which shouldn't be needed because there is this other way if we could find it Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 17, 2014 Author Share Posted April 17, 2014 Cant you set collsion for bullets self.entity:SetCollisionType(99) and then use if collisiontype~=99 then blah blah end and have bullets as 99. I don't talk about trigger or detect collision, but a way to be able to control what collision type should collide physically or not with another collision type. Some example : I don't want bullets of type 99 to collide with ennemy ships of type 97, but i want bullets type 99 to collide with player ships that have collision type = 90. Actually we can't tell LE3 engine : Type 99 No collision physics with Type 97 Type 99 Yes Collision physics with Type 90 Seems simply LE3 don't have collision groups/layers management. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
josk Posted April 17, 2014 Share Posted April 17, 2014 I remember using something called Sprite Candy for BB3D (was for Sprites) that had layers, worked very well. Something like that would be good. Quote Elite Cobra Squad 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.