However i need to figure out one more thing, and that is how to correctly apply the normal to the quad i use to represent the shild impact texture.
So far i have used a previous quad class which places it on a plane so all it is now is flat.
I assume it means tinkereing with either of these two:
Code: Select all
// Add end tile texture to make it easier to see
Vector3D topL = position + new Vector3D(-1.0f * scale, 0.0f, 1.0f * scale);
Vector3D topR = position + new Vector3D(1.0f * scale, 0.0f, 1.0f * scale);
Vector3D botL = position + new Vector3D(-1.0f * scale, 0.0f, -1.0f * scale);
Vector3D botR = position + new Vector3D(1.0f * scale, 0.0f, -1.0f * scale);
// Create vertices
quad.verts[0] = new Vertex3D(topL, new Vector3D(1.0f, 1.0f, 0.0f), new Color(255, 255, 255, 255), new Vector2D(1.0f, 0.0f));
quad.verts[1] = new Vertex3D(topR, new Vector3D(1.0f, 0.0f, 0.0f), new Color(255, 255, 255, 255), new Vector2D(1.0f, 1.0f));
quad.verts[2] = new Vertex3D(botL, new Vector3D(0.0f, 1.0f, 1.0f), new Color(255, 255, 255, 255), new Vector2D(0.0f, 0.0f));
quad.verts[3] = new Vertex3D(botR, new Vector3D(0.0f, 0.0f, 1.0f), new Color(255, 255, 255, 255), new Vector2D(0.0f, 1.0f));// = new Vertex3D[4];
Regards Wolfe