Jump to content

Check Colshape in Colshape


Recommended Posts

Posted

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

Posted

AFAIK, there is no function to find out if colshape is inside colshape. Explain your problem, we may find some alternative.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...