Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
threeJS .lookAt mirando hacia el lado equivocado, rotaciones heredadas

Solo estoy tratando de hacer que this._mesh.skeleton.bones[ 5 ] (ubicación: la curva en la cosa verde que viene de la mano) apunte de la misma manera que la línea amarilla auxiliar

 _FindBubble() { const handPosition2world = new THREE.Vector3(); this._anchor['LeftHandIndex1'].getWorldPosition(handPosition2world); const dir = handPosition2world; // helper yellow line const material = new THREE.LineBasicMaterial({ color: 0xffff00 }); const points = []; points.push( new THREE.Vector3( handPosition2world.x, handPosition2world.y, handPosition2world.z ) ); points.push( new THREE.Vector3( this._bubble._components.BubbleModelController.averageOfVertices.x, this._bubble._components.BubbleModelController.averageOfVertices.y, this._bubble._components.BubbleModelController.averageOfVertices.z ) ); const geometry = new THREE.BufferGeometry().setFromPoints( points ); const line = new THREE.Line( geometry, material ); this._scene.add( line ); dir.sub(this._bubble._components.BubbleModelController.averageOfVertices); dir.normalize(); return dir.negate(); } _Updateanimation(timeInSeconds) { const dirToBubble = this._FindBubble(); var dirToBubbleObj = new THREE.Object3D(); dirToBubbleObj.lookAt(dirToBubble); this._mesh.skeleton.bones[ 5 ].quaternion.set(dirToBubbleObj.quaternion); }

foto con this._mesh.skeleton.bones[ 5 ].quaternion.slerp(dirToBubbleObj.quaternion, 1) en lugar de set, .set(dirToBubbleObj.quaternion) no muestra nada del tubo verde de la mano después del hueso 5 descripción

cambiando _Updatedateanimation a

 _Updateanimation(timeInSeconds) { const dirToBubble = this._FindBubble(); this._mesh.skeleton.bones[ 5 ].lookAt(dirToBubble); }

me ha dado esto, que se siente como un progreso, no sé por qué es diferente, pensé que haría lo mismo que el código anterior, pero estaba escrito de manera más clara

ingrese la descripción de la imagen aquí ingrese la descripción de la imagen aquí corriendo, mano arriba

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

agregue un hueso de longitud mínima en lugar de 0 entre la mano y el tubo en el código a continuación y haga 1 -> 0 para que no haya una curva rara al principio, lo actualizaré más tarde cuando lo haga, pero a continuación da el efecto que buscaba

 _Updateanimation(timeInSeconds) { this._mesh.skeleton.bones[ 0 ].lookAt(this._bubble._components.BubbleModelController.averageOfVertices); this._mesh.skeleton.bones[ 1 ].rotation.x = Math.PI/2; }

ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!