Jump to content
  • Advertisement

ido098

Member
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

100 Neutral

About ido098

  • Rank
    Newbie
  1. ido098

    3d point - perspective projection

    what I did is a 3D-Line equation (and I split it into x,y,z ) (x, y, z) = point + t * ( eye - point ) to solve the equation I decided that Z=0 (since Z=0 on screen) btw thanks for the link, I think I'll manage from here
  2. hi.. I wrote an equation to calculate a 3d point's projection 98% of the time this equation works, but it's crucial that it will work 100% of the time. here's what I got: first we define some vars. eye -> 3D point for our point of view of the scene point -> 3D point that we want to project on the screen p2d -> our point after projection I assume that on screen, Z = 0, therefore: 0 = point.z + u * (eye.z - point.z) u = -point.z / ( eye.z - point.z ) p2d.x = point.x + u * (eye.x - point.x) p2d.y = point.y + u * (eye.y - point.y) this is an image when it's ok: http://postimage.org/image/bss2e9gcl/ this is an image when it's bad: http://postimage.org/image/t4sezp9tx/ just to make sure you see it, in the "bad" picture, you can see that one corner of the table moves to a different place which makes the table look bad... any idea why this happens? also, is there another way of doing this without changing my axes?
  3. ido098

    lookAt... mouse?

    is there any other way I can solve this?
  4. ido098

    lookAt... mouse?

    oh okok no problem.. thanks for explaning my game has a full 3d View, in third person mode ( so you see the bow from behind ) my bow's co-ordinates are given in world space (3D), then I translate it to 2D with the given perspective( to draw it on the screen ofc). and yes, I deal with vector math, most of the calculations I do with vectors here's an image for example: http://imageshack.us...2/bowarrow.jpg/ I'm not using any graphic engine or any engine.. I write everything on my own
  5. ido098

    lookAt... mouse?

    i don't know what you mean...
  6. Hey I'm working on a small bow and arrow game, and I'm trying to make my bow "lookAt" my mouse. (make the bow rotate so it will point to the mouse coords on screen) Any suggestions on how to do that?
  7. ido098

    Order of drawing

    I read about back-face culling I tried to implement it but I am having some problems. I calculate the normal vector and the vector the that points from the polygon to the camera and then I calculate the dot-product between these two vectors and if the result is greater or equal to zero, I draw the polygon, just like the method says. however, I get different results from different rotations. I uploaded an image to show you the problem. bad drawing good drawing what could be the problem?
  8. Hey.. lets say I have a 3d model and I want to draw it on my screen so I have to draw all of the polygons of my model how do I determine what polygons to draw and in what order? It's also good if you can point me to some guide or article that talks about this subject. thanks in advance
  • 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!