Hi,
In a visionOS application I have an entity that is displayed. I can give it a certain velocity by making it collide with another entity.
I would also like to be able to drag the entity and give it a certain velocity via the drag.
I searched in the project examples and found nothing. I also searched on the Internet without finding anything clear on the subject.
Looking at the drag gesture information I found gestureValue.velocity
but I have no idea how to use this property. I'm not even sure if this property is useful to me because it's a CGSize so, a priori, not intended for a 3D gesture.
If you have any information that will help me implement what I am trying to do I would be grateful. 🙏🏻
DragGesture()
.targetedToAnyEntity()
.onChanged {
pValue in
// Some code
}
.onEnded {
pValue in
//pValue.gestureValue.velocity
}