Post

Replies

Boosts

Views

Activity

Reply to Vision Pinch 3D Object
Oki, little question : The windows opened is nice and readable. But if I move it away of me on my object, the window and it content are "smaller". Normal! But on a normal glass window, when I move it away, the window size change but the contents is always readable (auto adaptation to have it readable) How can I do that? existing automatic system to set for a window to have this automatic ? Cheers Mathis
Aug ’24
Reply to Vision Pinch 3D Object
In fact, I've a balls in my environment. I would like to have the user to pinch one or other and display it distance to another central ball. He can pinch one ball, one other and one other and have information one by one, and when he want to not have information, he pinch in empty space.
Aug ’24
Reply to Vision Pro - Throw object by hand
Ok soled, I've changed the velocity index of "let forceMultiplier:Float = 2.0". From my move, the hand (closed fingers) could be out of the Vision pro cameras (but it is always in scope when finger be opened). When the hand is out of Vision Camera, the code thinks the hand is opened. Existing a way to have the hand considering closed in this case please ? Cheers and THANKS Mathis
Aug ’24
Reply to Vision Pro - Throw object by hand
Oppsss, it removed my first code line :( if let temp = scene.findEntity(named: "Boule_A") { Set_Entity_Params( entity: temp, mass: 0.70, friction: kBoules_Friction, rebond: 0.0005, ralentissement: 1, mode: .static) temp.components.set( ImageBasedLightComponent(source: .single( environmentLight!))) temp.components.set( ImageBasedLightReceiverComponent( imageBasedLight: temp)) temp.isEnabled = true mLesBoules.append( temp) temp.generateCollisionShapes(recursive: true) } and the function : func Set_Entity_Params( entity: Entity, mass: Float, friction: Float, rebond: Float, ralentissement: Float, mode: PhysicsBodyMode = .dynamic) { entity.components.set( InputTargetComponent( ))// Permet d'etre saisisable à la main entity.components.set( GroundingShadowComponent(castsShadow: true)) var spherePhysics = PhysicsBodyComponent( massProperties: .init(mass: mass), material: .generate(staticFriction: friction, dynamicFriction: friction, restitution: rebond), mode: mode) spherePhysics.isRotationLocked = (x:false, y:false, z:false) spherePhysics.isContinuousCollisionDetectionEnabled = false spherePhysics.angularDamping = 0.9 // rotation de fin de mouvement (+ il roule moins longtemps) spherePhysics.linearDamping = ralentissement // amortissement linéaire : Plus le chiffre est haut moins la boule part loin (comme si le terrain etait sablonneux) entity.components.set( spherePhysics) }
Aug ’24
Reply to Vision Pro - Throw object by hand
Hello Me again, I've tried to change one ligne of your code to have ball in place of the cube. I've replaced by: let throwable = ModelEntity(mesh: .generateSphere(radius: 0.1), materials: [SimpleMaterial(color: .red, isMetallic: true)]) and what's funny is the ball not roll when are o the ground, or, to be clear, they roll really strange :( other test is to use my ball I've in my scene : { Set_Entity_Params( entity: temp, mass: 0.70, friction: kBoules_Friction, rebond: 0.0005, ralentissement: 1, mode: .static) temp.components.set( ImageBasedLightComponent(source: .single( environmentLight!))) temp.components.set( ImageBasedLightReceiverComponent( imageBasedLight: temp)) temp.isEnabled = true mLesBoules.append( temp) temp.generateCollisionShapes(recursive: true) } { entity.components.set( InputTargetComponent( ))// Permet d'etre saisisable à la main entity.components.set( GroundingShadowComponent(castsShadow: true)) var spherePhysics = PhysicsBodyComponent( massProperties: .init(mass: mass), material: .generate(staticFriction: friction, dynamicFriction: friction, restitution: rebond), mode: mode) spherePhysics.isRotationLocked = (x:false, y:false, z:false) spherePhysics.isContinuousCollisionDetectionEnabled = false spherePhysics.angularDamping = 0.9 // rotation de fin de mouvement (+ il roule moins longtemps) spherePhysics.linearDamping = ralentissement // amortissement linéaire : Plus le chiffre est haut moins la boule part loin (comme si le terrain etait sablonneux) entity.components.set( spherePhysics) } And all running pretty well, I can get my ball in hand, move it, but when I release it from my hand, it disappeared :( Linear impulse it pretty the same than I've with your cubes. But, I don't know why my ball goes very very far of me, also if I make no move, just drop it in place.. I hope you could help me because I've consumed this day and I begun to be crazy 8o( Cheers and thanks for your help !!! Mathis
Aug ’24
Reply to Entity Coordinates in Object Tracking
First at all, I wanna to TANKS YOU. I'm really surprised to have a so nice and complet reply !!!!! Amazing !!!!! I've create a new project to test your code, and I've a simple but unsolvable trouble, is XCode can't found SpatialTrackingSession : "Cannot find 'SpatialTrackingSession' in scope". I've searched over the web and I've not found how to have it. Could you help me please ? Cheers and THANKS ! Mathis
Aug ’24