Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

jimywang

How do I make it looks like walking?

This topic is 5564 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am making a FPS game with Ray casting at the moment.I have finished a the engine.the player is able to walk around in my little my maze.but everything just looks as bad as the wolf 3D.When you are moving the player,it just likes you are moving the camera rather than the feeling of walking.what I really want is something like doom,when the player is moving,the background shakes a bit,so you get kinda of impression that you are actually walking.How can I do that?

Share this post


Link to post
Share on other sites
Advertisement
You could add a bounce, which would basically be a small jump as the player walks. I think Doom had a head bob from left to right, which I guess would be a bounce with left to right motion.

Share this post


Link to post
Share on other sites
Basically what you''re looking for is a head bob. When you''re moving the camera have it move up and down or left and right a certain amount when moving, and when you stop have it move back to centered.
Basically you keep the xyz coords of your camera, and move that normally, but also have a variable that will change the render position depending on where the variable is. Ie, you take the variable, say a float that stays between -1 and 1, and multiply that by a certain number that you want to bob by, say 3 units, which you then add onto your camera''s coords when creating the view matrix.

Or you can do what I do and put a specific object in your model that is considered the camera point and when it''s animated it follows the model''s head''s movements, so you''re actually seeing from the model''s eyes...

Share this post


Link to post
Share on other sites
I had that idea too, putting the camera where the actual character was. But the problem that I never figured out was the clipping; what if the model''s head was too big, and all I ever saw was the inside of it?

Share this post


Link to post
Share on other sites
As I said, I have a seperate, invisible helper object in my models that represent the camera. I place it just in front of the nose, between the eyes. That way it's in the right place, but is in front of the head. My only difficulty was that I would set the view matrix before moving character, so sometimes a section of the nose would appear because the model moved into where the camera was before I moved it. I fixed that by calling the move function first, then locking down the camera positions for rendering. (Do not integrate the move function with the draw function. That was another problem I had in the first few engines that caused the same disturbance.)

Or, of course, you can do as most games seem to do--not render the model that the camera is looking from. Why do I say most games seem to do that? Because if you look down at your feet you don't see your feet, even though they are obviously far enough away as to not be cut off by the near clipping plane and very very obviously close enough to not be cut off by the far clipping plane.

[edited by - Erzengeldeslichtes on September 21, 2003 10:06:37 PM]

Share this post


Link to post
Share on other sites
I dont see why you want to render your model when your viewing first person. As the user never actually sees the character, its just a waste or time and memory. If you want to look down and see your feet, then just have a model of their lower body half. If you wanted to have the camera follow a certain bone, then theres no problem having extra bones that represent the character limbs etc, just dont have any polys there

Share this post


Link to post
Share on other sites
Why bother modeling the lower half of the body when you already have the full body? The head isn''t that many extra polies. Yes, when you aren''t looking down, the model itself should be outside your view frustrum and will not render, but when you look down it should show your body (including your chest). However, this is a design question. If you don''t think it''s worth while to be able to see your body, then by all means, set the model to not render for that camera. I just like the idea of attaching the camera to the body at the head, and then being able to tilt the head down and look at the body without going to third person and as such, in my design, you can. But what you do is up to you.

Share this post


Link to post
Share on other sites

  • 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!