Hello, for the Man Mesh I created, I want to make the quaternion part of the Ringman mesh 0,0,0,0 but it doesn’t work when I change it. It is not set to 0. What is the error?
export function generateMesh(name, ring, shape) {
var radius
var mesh = appInstance.scene.getObjectByName('Ring' + name)
var planeShadow = appInstance.scene.getObjectByName('planeShadowInstancepointRight')
if (mesh) {
appInstance.scene.remove(mesh)
mesh.geometry.dispose()
}
// daire yolu oluştur
if (ring.size == 15) {
radius = 1
} else {
radius = (ring.size - 15) * 6
}
//çıkar ve çiz
var degreesStart = 0
var degreesEnd = 360.05 // 360.05
var radiansStart = (degreesStart * Math.PI) / 180
var radiansEnd = (degreesEnd * Math.PI) / 180
var pathCircle = new THREE.Curve()
pathCircle.getPoint = function(t) {
var segment = (radiansStart - radiansEnd) * t
return new THREE.Vector3(radius * Math.cos(segment), radius * Math.sin(segment), 0)
}
var extrudeSettings = {
curveSegments: 10, // 10,
steps: 2000, // 70,
depth: 0,
bevelEnabled: false,
bevelThickness: 0,
bevelSize: 0,
bevelSegments: 0,
extrudePath: pathCircle
}
var geometry = geometry2.extrudeGeometry(shape, extrudeSettings)
mesh = new v3d.Mesh(geometry)
mesh.geometry.computeBoundingBox()
mesh.geometry.center()
// örgü yumuşatma
//mesh.geometry.mergeVertices ();
mesh.geometry.scale(0.072, 0.072, 0.072)
mesh.name = 'Ring' + name
mesh.geometry.computeVertexNormals(true)
var min = -0.05
var max = 0
var a = mesh.geometry
if (name === 'man') {
if (mesh.name === 'Ringman' && mesh.type === "Mesh") {
mesh.quaternion.x = 0
mesh.quaternion.y = 0
mesh.quaternion.z = 0
mesh.quaternion.w = 0
}
}
mesh.updateMatrix()
return mesh
}