Jump to content

[Help] isElementWithinColShape


victormgons

Recommended Posts

Posted

Hi, I want to check if one object is inside the colshape, but this isn't working:

col = createColCuboid(349,2489,15.5,5,5,3) 
obj = createObject(1549,352,2492,17) 
if isElementWithinColShape(obj,col)then 
  outputChatBox("OK",getRootElement()) 
end 

Can someone help me?

Thanks

Posted

From wiki: 'a colshape created on the client does not collide with elements already existing at that location until they first move'

I don't know if yours is client or server but seems it is not working because the object hasn't moved after the creation of the colshape or perhaps the problem is in real code and not this demo.

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...