ManipulationEvents
Events that occur while a person manipulates an entity.
Declaration
enum ManipulationEventsOverview
You can subscribe to these events using subscribe(to:on:_:). For example, you can change the color of an entity’s material when the manipulation gesture begins and ends.
_ = content.subscribe(to: ManipulationEvents.WillBegin.self) { event in
event.entity.components[ModelComponent.self]?.materials[0] = SimpleMaterial(color: .blue, isMetallic: false)
}
_ = content.subscribe(to: ManipulationEvents.WillEnd.self) { event in
event.entity.components[ModelComponent.self]?.materials[0] = SimpleMaterial(color: .red, isMetallic: false)
}Topics
Detecting manipulation gesture events
ManipulationEvents.WillBeginManipulationEvents.DidUpdateTransformManipulationEvents.DidHandOffManipulationEvents.WillReleaseManipulationEvents.WillEnd