scale and position cylinder
@@ -12,7 +12,12 @@ out vec3 nor;
void main()
{
- pos = position + position1 - position0;
+ pos = position;
+ pos.x *= distance(position1, position0);
+ pos.y *= 0.1;
+ pos.z *= 0.1;
+
+ pos += position0;
nor = vec3(0.0, 1.0, 0.0);
gl_Position = projectionMatrix * viewMatrix * vec4(pos, 1.0);
