Closed wtiaw closed 2 years ago
Hello @wtiaw Remember that entities are small unique identifiers that point to a combination of fragments and tags in memory.
If your collision shape is shared across all your entities in your archetype, you could use a Shared Fragment to set your collision data and then engineer collision heuristics in your processors.
The other option you have is to employ real actors with colision for the lowest levels of LOD (using the set of LOD traits) and employ entities for distant objects. My main advice for this is to take a look at the Matrix demo.
Unfortunately adding collision is not a very simple request... But we'll try to ask Epic if it would be possible to offer in-house collisions for raw entities.
By @wtiaw
I successfully solved this problem with the following three steps:
(in
MassVisualizationComponent.cpp
)
- Set ISMC's
CollisionProfileName
toBlockAll
- Set
UE::MassRepresentation::GCallUpdateInstances
to 0- Before
BatchUpdateInstancesTransforms()
callRecreatePhysicsState()
By @wtiaw
I successfully solved this problem with the following three steps: (in
MassVisualizationComponent.cpp
)
- Set ISMC's
CollisionProfileName
toBlockAll
- Set
UE::MassRepresentation::GCallUpdateInstances
to 0- Before
BatchUpdateInstancesTransforms()
callRecreatePhysicsState()
As a side comment to @wtiaw post, we confirmed that this approach would tank down your game time, so be careful with it.
Can the Mass Entity has collision?
I try to change ISMC's CollisionProfileName to BlockAll (in MassVisualizationComponent.cpp) but it doesn't work.