Disabling collisions on objects

Is there a way to disable collisions on an object? I know you can do it for the camera, but I need to know how for objects like the square. It would be very handy for triggers.

Thank you in advance

1 Like

Hi @sam.philips,

Selecting items to be ignored by the camera collision is currently not possible in CoBlocks. However, you can achieve this effect via scripting:

//Find the item to be added to the collision filter
let trigger = Scene.getItem("trigger");

//Add the item to the collision filter

Check out the example below to see how you can combine CoBlocks collision events to check for collision of the trigger in combination with scripting to add an item to be ignored by the camera collision.

Hope this helps!


Hmm, It doesn’t work for me. I do have objects attached to the camera. Is that the problem?

Hi @Blazifying,

It doesn’t work for Groups - see Group collision issue

I’m suggesting this in case you’re using Groups. If you’re not, can you provide further detail, or a link to a remixable CoSpace, so we can help you debug the issue?

Many thanks,
Geoff @ TechLeap

Never mind. I figured out that the editor camera was interfering with the script.

1 Like

Hi Stefan, I would like to ask to the @CoSpaces_Edu if it would be possibile to create a CoBlock with a collision filter. In this moment we are planning to create Escape Rooms and sounds are important. For students these passages would be too complicated, at least for my students