Adding collisions between camera and other objects


So I’m trying to get a collision event between the Camera and other objects (ex: If you collide with a door, it takes you to another room or something reacts to you).

I’ve tried a collision event like below. Additionally, the camera was Walkable, with collisions activated.

It doesn’t seem like the collision event registered when I ran the game. Is there a collision/bounding box already assigned to the camera that I can use? Additionally, is this the most efficent way of doing a collision between the camera and in-game objects?

I’ve also considered parenting an invisible box to the camera (for the purposes of a collision box), but I can directly attach objects to the camera.

I’m attempting to do the same type of thing. I did find this code on the Google groups about camera collisions. (!topic/cospaces-scripting/iHnvj77g3VU) Perhaps it can help.

Hi Peter,

in this block it’s not possible to change the variable “another item”, only the name of this variable. This variable always refers to the other item the player is colliding with, regardless of the name of this variable. If you want to check if “another item” is the door then you can do it with an if-statement like this:

Make also sure that you’re registering events like this at the very top of your code.