I created a vector with CylinderGeometry, as the length approaches zero it turns to a point at origin. If the length never approaches zero everything works fine but if it’s once zero (and therefore turns to a point) then gets another nonzero value, at the base of the vector, cylinder partially gets disappeared!
the code I’m using to generate the Vector in React:
<group ref={ref} position={origin}>
{_mag >= thicknessFacor * HHEIGHT ? (
<>
<Shaft
mag={_mag - thicknessFacor * HHEIGHT}
direction={_dir}
color={color}
opacity={opacity}
onPointerDown={onPointerDown}
thicknessFactor={thicknessFacor}
hover={hover}
/>
<Head
position={headPos}
direction={_dir}
color={color}
opacity={opacity}
thicknessFactor={thicknessFacor}
onPointerDown={onPointerDown}
hover={hover}
/>
</>
) : (
<Point
color={color}
position={[ORIGIN.x, ORIGIN.y, ORIGIN.z]}
opacity={opacity}
transparent={true}
pkey={'zero_vector'}
/>
)}
{label}
</group>