Sign in to follow this  

Changing y and z coordinates in a vector?

Recommended Posts

ok I have this function (bulletHit) and I want to change all the y and z coordinates of Vector3D *vertexList (Which holds the world vertices loaded from a raw file). Below is how I am trying to change them. Doesnt seem to work at all. Can I actually do this?? Hope this makes sense. Vector3D bulletHit(Vector3D *vertexList, int totalVert, Vector3D bulletStart, Vector3D bulletDirection) { for(int j = 0; j < totalVert; j++) { float fTempY = vertexList[ j ].y; vertexList[ j ].y = vertexList[ j ].z; vertexList[ j ].z = -fTempY; } //REST OF THE FUNCTION

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this