So in UPBGE version 2.7.5 you can simply set an object to static and using the Components via script you can check collisions with another object by doing this:
def update(self):
self.collision()
def collision(self):
if self.object.collide("player_1")[0]:
self.dir_x = 0.1
but I can’t figure out how to do the same in 0.3
I tried looking into the 3 collision functions found in object
print(self.object.collisionGroup)
print(self.object.collisionCallbacks)
print(self.object.collisionMask)
but they don’t seem to be what I need. Can anyone help me? Thank you.
A little more info. This is a tutorial to create a simple ‘PONG’ game.
the two rectangles are set to ‘character’ under physics and the ball is ‘static’.