Visibility has no effect on collision ?

Hi !

I have a BP containing several UStaticMeshComponent, heach holding a UStaticMesh.

My problem is that when i set one component to be invisible (SetVisibility(false)), it still collides with other actors.

In following screenshots, i throw a die on a BP containing two UStaticMeshComponent: a table and a translucent cube. When cube has no collisions, die rolls on table, when it has collisions, it intercepts die even when it’s invisible.

Cube visible and set to have collision => collisions occur (normal behavior):

Cube visible and set to have no collisions => collisions do not occur (normal behavior):

Cube invisible and set to have collision => collisions occur (incorrect behavior ?):

Can you tell me if you find this strange ? It would seem quite natural that an invisible object stops interacting with world.

If it’s a wanted feature, does that mean i have to manage my collisions dynamically when i change visibility ?

If it’s not, i can give you some repro steps if you want.

Thanks

Cedric

Hi uced,

This is working as intended, as it is possible to want invisible collision.

If you’d like an actor to be both invisible and have no collision, you’ll need to adjust both settings. There are several nodes for this in Blueprint, easiest being Set Actor Enable Collision, which you can use to enable or disable collision for entire actor. There are others as well, depending on situation:

Hope that helps!

Hey ,

Thank you very much, i just needed to be sure it was intended, i understand reasons.

In fact i have already coded a workaround to manage my collisions dynamically. So this workaround has just been promoted to final solution :-))

Cheers

Cedric