ZuluTangoDelta Posted January 16, 2014 Share Posted January 16, 2014 Hello.I try to check whether a colshape is in a colshape.I guess it does not work with isElementWithinColShape but why?I thought a Colshape is also a element. So this is my try: function getColshapesElementisin(element) Colshapetable = {} if element or isElement(element)then for i,colshape in ipairs(getElementsByType("colshape"))do if isElementWithinColShape(element,colshape) then table.insert (Colshapetable, table.getn (Colshapetable)+1,colshape) end end end return Colshapetable end Btw You must know that the element must be a Colshape, because i want to use the function to check whether a Colshape is inside another Colshape. Element = Colshape Link to comment
50p Posted January 17, 2014 Share Posted January 17, 2014 AFAIK, there is no function to find out if colshape is inside colshape. Explain your problem, we may find some alternative. Link to comment
ZuluTangoDelta Posted January 17, 2014 Author Share Posted January 17, 2014 I want to check whether a object is inside another object. Link to comment
50p Posted January 17, 2014 Share Posted January 17, 2014 Objects have bounding box models which are invisible and collisionless. You can use getElementBoundingBox instead. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now