Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

110 Neutral

About Weeve

  • Rank
  1. include your code for ComputeNormals() you might be tring to access a value past the size of an array, which would be incorrect RAM management
  2. More info needed, What language is that? C++? What does your draw code look like, have you tested it with a known poly? What are the meshes supposed to look like?   Explain why you are using Equals(a,b) instead of "==" if that is C++   Why do you have j start at the value of i plus one? for (int j = i + 1; j < indexvector3.Vertices.Count; j++)   Have you tried printing out every vertice in you buffer to confirm its the same amount as the sum of your mesh   I don't see support for both Quads and Trigs, possibly your problem, as it could cause an off by one error in your drawing   When you have a large amount of code like this, try to narrow down your problem before posing it on a forum, instead of saying "my code dosn't work, how do I fix it?"
  3. Have a menu where you assign keys via what is inputted, for instance "Set yaw axis" and there would be a button next to it, once the button is pressed, the next event you pick up should be the yaw axis, that way, players who prefer gaming controllers, or non standard flight sim joysticks can change the config if they don't like the defaults, this will also work in your case, where you can make a config for each controller (automatically reccognize controllers, if you want to be fancy), and the configs would say "he wants to use throttle for Yaw".. etc then simple lock onto the signals from the keys in config file  for your controls
  4. Weeve

    Electronic circutboard pattern noise?

    it depends on how realistic you want the board to be, for instance, do you want the board to actually interact with ports, such as USB, or a generic serial connection type? if so, then first run a pathfinding algorithm from you power supply source, thru a transformer, and then thru a capacitor (basic DC conversion), to the power pins in the usb, making the usb have basic charging functions, then filter the serial ports of the usb thru capacitors that are tuned to filter off into different signals, and run these signals into the processing chip, or to transistors (basic switches), and have the return connected to a RAM chip, this provides you with the basic concepts of a circuit board, remember to include nodes in the pathfinding algorithm (nodes are the little copper dots that transfer electricity to the other side of a board). after you build that base-code, randomizing the position of the power supply, the processor, and the usb connection(or generic serial connection) will give you large amounts of difference
  5. Its still broken, your fix didnt work also, the rotation only messes up when its been tilted, I can rotate on the Y axis without skewing, but as soon as I rotate it on a Z or X and then the Y, it skews, and at a 90* rotation, where the object is facing upward, and a object space rotation 180* on the Y axis rotates the car on the Y axis 90*, while changing its Z axis to a length of 0, and reverses the Z axis for the rest of the rotation, bringing the car back to normal, but with a flipped Z axis. I'm thinking deffinitley a math problem
  6. I can't seem to understand how rotation works globally, although I followed a tutorial, and failed at replicating the results, my code from the tutorial is: // matrix ordering: // XMatrix(x,y,z) // basically the X vector, and so on // YMatrix(x,y,z) // ZMatrix(x,y,z) void MeshObject::GlobalRotateY(float roty){ float cosy = cos(roty); float siny = sin(roty); sf::Vector3<float> XMatrix(cosy,0,-siny); sf::Vector3<float> ZMatrix(siny,0,cosy); sf::Vector3<float> XMtransform((XMatrix * _XMatrix.x) + (ZMatrix * _XMatrix.z) + sf::Vector3<float>(0,_XMatrix.y,0)); sf::Vector3<float> ZMtransform((XMatrix * _ZMatrix.x) + (ZMatrix * _ZMatrix.z) + sf::Vector3<float>(0,_ZMatrix.y,0)); _XMatrix = XMtransform; _ZMatrix = ZMtransform; PointsToMatrix(); } This has the odd effect of when the matrix is tilted on the X or Z axis, the code ends up rotating the mesh, but it also skews and squishes it in the process, so I had to have done something wrong.. heres working code for object oriented rotation, that I could easily build myself: void MeshObject::RotateY(float roty){ for (unsigned int i=0;i<_verts.size();++i){ sf::Vector3<float> transform( _verts.x - _Position.x, _verts.y - _Position.y, _verts.z - _Position.z ); _verts = transform; } float cosy = cos(roty); float siny = sin(roty); sf::Vector3<float> XMatrix(cosy,0,-siny); sf::Vector3<float> YMatrix(0,1,0); sf::Vector3<float> ZMatrix(siny,0,cosy); XMatrix = sf::Vector3<float> ((_XMatrix * XMatrix.x) + (_YMatrix * XMatrix.y) + (_ZMatrix * XMatrix.z)); YMatrix = sf::Vector3<float> ((_XMatrix * YMatrix.x) + (_YMatrix * YMatrix.y) + (_ZMatrix * YMatrix.z)); ZMatrix = sf::Vector3<float> ((_XMatrix * ZMatrix.x) + (_YMatrix * ZMatrix.y) + (_ZMatrix * ZMatrix.z)); _XMatrix = XMatrix; _YMatrix = YMatrix; _ZMatrix = ZMatrix; PointsToMatrix(); for (unsigned int i=0;i<_verts.size();++i){ sf::Vector3<float> transform( _verts.x + _Position.x, _verts.y + _Position.y, _verts.z + _Position.z ); _verts = transform; } } please help me, I have been having headaches when I try to understand what went wrong, and help will be appreciated ^.^, as it would let me focus on other matters of the program that sorely need attention
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!