Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to check if a target is inside an object?

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

Code:
obj1 = RDK.Item('box1', ITEM_TYPE_OBJECT)
methoda = RDK。工艺教育学院m('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.


Messages In This Thread
How to check if a target is inside an object? - byMatthias_J- 12-08-2020, 10:07 AM



Users browsing this thread:
1 Guest(s)