How to make a game object only respond to another object (SOLVED)

So I have 3 game objects Logo(Player) go2(moving object) and bas(Unmoving object). How do I make it so logo interacts with go2 and bas but they dont interact with eachother. How do I code it so a collision response is only from a specific game object.
Curent code

function on_message(self, message_id, message, sender)
	-- check for the message
	if message_id == hash("collision_response") then
		msg.post("bas#Planetscript", "terraform")
	end
end

You need to assign different collision groups and check message.other_group. Refer to the Physics manual.

1 Like

As britzl said it’s not a code thing, it’s a value that you change in the collision object directly (The “group” and the “mask” I believe). Check the manual!

1 Like

Thanks, I tryed that before but I used it wrong. The Physics manual taught me the way that works. It works fine now, thanks.