So I found my problem. It was a little tricky. I can't double add the ManipulationComponent to an Entity.
Then I comment the var mc = ManipulationComponent() out it works stable.
ManipulationComponent.configureEntity(entity)
// var mc = ManipulationComponent()
if var mc = entity.components[ManipulationComponent.self] {
mc.releaseBehavior = .stay
mc.dynamics.primaryRotationBehavior = .none
entity.components.set(mc)
}
Topic:
Spatial Computing
SubTopic:
General
Tags: