Skip to content

Conversation

@V2iDanAbend
Copy link

Description

Adds a very small function that allow the Cesium3DTileset to have the Collision response change per collision channel which is present in standard Unreal StaticMeshActors.

This is extremely useful for changing the collision response for just pawns but still retain hit responses for other channels such as vehicles. An example use case is to set the Pawn collision response to ignore if the player pawn is within a small CartographicPolygon that would otherwise not have the partially clipped tile collisions removed. All other actors in the world will still have normal collision response to the tileset for game play purposes.

image

Issue number or link

Related to my question here about finding interior of CartographicPolygon: https://community.cesium.com/t/best-way-to-check-if-object-is-inside-or-outside-of-a-cartographicpolygon/42926?u=v2i

Author checklist

  • [ x ] I have submitted a Contributor License Agreement (only needed once).
  • [ x ] I have done a full self-review of my code.
  • [ x ] I have updated CHANGES.md with a short summary of my change (for user-facing changes).
  • [ x ] I have added or updated unit tests to ensure consistent code coverage as necessary.
  • [ x ] I have updated the documentation as necessary.

Remaining Tasks

No remaining tasks that I know of.

Testing plan

Can be called in C++ or Blueprint. Accepts array or single object reference. Tested with player Pawn and Vehicle channel dynamic response changes.

@kring
Copy link
Member

kring commented Oct 31, 2025

Thanks for the PR @V2iDanAbend! This looks great, just one problem that I can see:

When a collision response is changed, there's some code like this meant to apply the change:

          Prim->SetCollisionEnabled(ECollisionEnabled::NoCollision);
          Prim->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);

The problem with this is that not all components should have QueryAndPhysics enabled. The total set of GltfComponents includes both currently-visible tiles and also tiles that are loaded but not currently visible. For example, a low-detail tile may exist (but be hidden and have physics turned off) while high-detail tiles are shown. But turning collision off and then on, you'll end up enabling it for tiles for which it was originally off. This will likely lead to phantom collisions with invisible tiles.

The solution, I think, is to only toggle QueryAndPhysics off and back on if it was on to begin with.

@kring
Copy link
Member

kring commented Oct 31, 2025

Hmm also CI is reporting that UpdateCollisionProfile isn't a valid function...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants