12-08-2020, 10:07 AM
Hello everybody,
in my Python script I generate lots of targets. Some of them are inside an object so I don't want to generate these ones.
I tried the RDK.Collision(Item1, Item2) function but it seems that it doesn't work with targets. There is no error but it always results a 0 (no collision). The target I used for this test was definitely inside of the object.
The function works fine if I use two objects.
How can I use this function with targets or is there any other way to check if a target is inside of an object?
Thanks for your help.
in my Python script I generate lots of targets. Some of them are inside an object so I don't want to generate these ones.
I tried the RDK.Collision(Item1, Item2) function but it seems that it doesn't work with targets. There is no error but it always results a 0 (no collision). The target I used for this test was definitely inside of the object.
The function works fine if I use two objects.
Code:
obj1 = RDK.Item('box1', ITEM_TYPE_OBJECT)
obj2 = RDK.Item('box2', ITEM_TYPE_OBJECT)
testtarget = RDK.Item('testTarget')
checkCol = RDK.Collision(obj1, obj2) #this works fine
checkCol = RDK.Collision(obj1, testtarget) #this never results a collision
How can I use this function with targets or is there any other way to check if a target is inside of an object?
Thanks for your help.