pjStyle

Member
  • Content count

    13
  • Joined

  • Last visited

Community Reputation

124 Neutral

About pjStyle

  • Rank
    Member
  1. Hey guys, I've been running into a problem with SDL 1.2.15 on my mac. Whenever i switch between fullscreen and windowed when my game is running i get a completely black screen. The same happens when i call the SDL_Iconify function on a Mac. I've tested on multiple versions of Macos (up to Lion i believe) and all show the same behaviour. Has anybody on this forum ran into this issue by chance? Regards, Ted de Vries
  2. Hey guys, We are working on a mac port of our game but have no experience what so ever with mac development :). So we have the option Force include set in visual studio to make sure certain header files are always included. Does anybody know if an option like this exists in Xcode?? A workaround would be including the header files where needed, but this will be a gigantic amount of work :). Also some tips regarding mac development would be greatly appreciated too! Thanks! - Ted de Vries
  3. Hey gamedev, I am working on a side project, a isometric diablo type game. And i've run into a problem :) I can't seem to get the movement of the player correctly mapped to the analog sticks of my controller. What i want is that when i press up on the stick, the character moves up in the world. The movement of the character is on a XZ plane, so i figured when you point the camera straight down at the character, the stick would directly map to the correct character movement. IE up on the stick is +z and down on the stick is -z movement. So i figured when we have the direction where the camera is looking at, and the down vector, we would calculate the angle between these vectors and transform the controller input accordingly. In code: // Make sure our character is moving correctly, ie. when we press up we move up tVector3 baseDirection = ControllerInputhandler::get()->getLeftStickPosition(0); baseDirection.normalize(); tVector3 baseCameraLookAt(0, -1, 0); tVector3 currentCameraLookAt = mCamera->getTarget() - mCamera->getPosition(); currentCameraLookAt.normalize(); tVector3 transformedDirection(baseDirection.y, 0, baseDirection.x); float angle = MathTools::getAngleBetweenVectors(baseCameraLookAt, currentCameraLookAt); tMatrix matTransform = tMatrix::createAxisAngle(tVector3(0, 1, 0), angle); transformedDirection = matTransform.transform(transformedDirection); But i guess im missing something, since im not an expert in this kind of math! :) I hope my question is understandable since it is quite a long story. [Edited by - pjStyle on August 25, 2010 10:36:06 AM]
  4. Cross product question

    Couldnt get it working just yet. Any more tips what i should try next? I would like to be able to determine if i need to rotate across the X or Y axis depending on the side im on and the side im moving to. Anyone have an idea how i would do this?
  5. Cross product question

    haegarr, What you mentioned is spot on, that's exactly what is happening now. Hopefully everything will be working fine tonight. Thanks for the replies!
  6. Cross product question

    Alright great, i'll see if i can get it working tonight!
  7. Cross product question

    Hey there, Im creating a little prototype at the moment and have run into some trouble. In the prototype the player is able to move across the sides of a cube. Now i want to create a nice little rotation effect when of the borders is reached. How i have it set up now is as follows: * Every side of the cube is assigned a normal. * When the border of a side is reached the normals of the two adjacent sides are placed into a cross product. Now this works in some situations, but the cross product should only produce rotations across the X and Y axis. For example the front side has a normal of (0,0,1) and the side on the left has a normal of (-1,0,0). Now taking the cross product of these produces a rotation across the Y axis what i would expect. Now when the normals (-1,0,0) and (0,1,0), or in other words moving from the left side to the top side, are placed in the cross product this resulsts in a rotation across the Z axis. My question is, am i using the correct method of determining these rotations by using normals? Or is there another way? Thanks in advance!
  8. Bezier curve describing (camera) path

    jyk, Yes! That is exactly what i want to achieve.
  9. Bezier curve describing (camera) path

    Maybe i wasn't clear enough on what i wanted. I want to calculate the position on the bezier curve depending on the position of the player in the level. What i want to achieve with this system is predetermine the movement of the main camera in a level. And make it follow the movement of the player.
  10. Hey there, I am working on a little prototype using a bezier curve to determine the path objects will traverse. In my prototype i use this bezier curve to control the camera movement in my scene. This movement across the bezier works fine now. My question is the following. I want the camera position on the curve to adjust itself to the position of the player in the scene. To illustrate look at the following image: I marked the top-left and bottom-right positions in the scene to illustrate where the camera should be. How would i be able to calculate the positioning of the camera relative to the player position? Thanks in advance, Ted de Vries
  11. Hello there, My problem is the following. I am making a simple 3d engine which exports to a dll. In one of the classes i have a function in which i want to fill a vector with data. This vector is supplied as an argument. The following link shows the function which is having problems. http://hstuart.dk/paste/view.aspx?id=d7bf405d-d4b1-4c2b-9384-03b56976c6d1 I have tried to place this function in a test project(apart from the dll) and it's functioning as expected. I hope somebody might know how i can solve this problem. Thanks in advance, Ted de Vries
  12. Triangle mesh splitting

    Thanks for the fast reply. Yes i should be possible to split triangles. I already have some (not fully) working code, where i use the method you describe in your post by slicing up the mesh along a predetermined plane. The thing is, i'm curious if there are any other working theories concerning the splitting of triangle meshes.
  13. Hey there, I'm working on a little project which must be able to split an existing triangle mesh into a predetermined amount of smaller meshes. I'm trying to read up on the topic but haven't been successfull in finding anything which can get me going. So my question is if anybody on these forums know some good links relating to this subject.