I've run into a problem with the Overlaps condition in Python. In my test file, I've got a moving block (object1) and a stationary block (object2). When the moving block is overlapping the stationary block, I want a text object (text) to display "True." When the moving block is not overlapping the stationary block, I want the text object to display "False."
I've gotten this to work using the normal events on the event sheet, but I want to do it using a Python script. I've tried the following, but it doesn't work:
if object1.Overlaps(object2) == True:
text.Text = "True"
else:
text.Text = "False"
What am I doing wrong? The text object displays "False" even when object1 is overlapping object2. Overlaps doesn't seem to work how I expect it to. Does anyone have any suggestions about how to get this to work? Any help would be greatly appreciated.
-Zumbooruk