Public Group

# I want a smooth walk!!!!

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

## Recommended Posts

Hi. I'm working in a "little program" that reads a heightmap in bmp format and reads the events from keyboard and mouse to let the user move. The camera works well when it's in free mode (no collision with the terrain) but when I want to walk, the movement isn't very smooth. I calculate the height of the point (x,z) where the camera is, calculating the plane that is defined by the triangle below the camera, but when the camera moves from one triangle to another there's a "crack" in the screen. It's something natural ,do you think that there's some wrong equation, or maybe there are too many or too few triangles? If it's natural how can I smooth the movement? I'd tried to use interpolation in the heights but I'm not sure how to implement this. As always, forgive(or forget) my english :(

##### Share on other sites
This is probably becuase your terrain is too course. When you say you've tried to use interpolation on Z, what exactly do you mean? Probably some source that shows what you are trying to do would help as well.

##### Share on other sites
I think you want to create a higer level of detail for nearby polygons. This way you'll have a higher definition "grid", and smoother transitions.
You could just interpolate and not render these points, but I'm afraid this would lead to artifacts like the character floating above or sinking into your terrain.

##### Share on other sites
Quote:
 Original post by Anonymous PosterThis is probably becuase your terrain is too course. When you say you've tried to use interpolation on Z, what exactly do you mean? Probably some source that shows what you are trying to do would help as well.

Yes.You're right.It was problem of the terrain. Now I smooth the terrain with a home-made function and it's sooo smooth.
The interpolation was an experiment but It didn't work at all.

Thanks!

Quote:
 I think you want to create a higer level of detail for nearby polygons. This way you'll have a higher definition "grid", and smoother transitions.You could just interpolate and not render these points, but I'm afraid this would lead to artifacts like the character floating above or sinking into your terrain.

I would love to create a LOD but I fear I don't have time...But when I finish the exams I'll try.

Thanks!

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 11
• 15
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
634151
• Total Posts
3015825
×