#### Archived

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

# 6 feet under...

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

## Recommended Posts

Hello, i got some little questions about level/map development. i m working on a GLclient for a mmorpg-server our team developed. the first thought about that game were, not to use polygon based level/map. it should be 2d tiles projected on the XZ. after some really hot discusions, i forced our designer to think about polygons to walk on... (to get more realism) the mainproblem is, that im not really new to opengl, but also im not the pro-coder. now the question... (omg how do i let the moving objects stay on my floorpolygon? i know it could be some linear algebra? is this tricky or can someone just tell me some "keywords" for google? maybe it help if i tell, that we using milkshape models for the levels (btw. we only use outdoorlevel). there is no need to pre-chew it. just some hints would be nice °Yoki

##### Share on other sites
You cast a ray from the player to the floor to retrieve the distance. If it's negative, the player is under the floor.

This would be the 3D way to do it, but you're using 2D so why not:
if( (Player.Y - Player.Height) // His feet-height    < Floor.Y ){Player.Y = Floor.Y + Player.Height;}

--
You're Welcome,
Rick Wong
- Google | Google for GameDev.net | GameDev.net's DirectX FAQ. (not as cool as the Graphics and Theory FAQ)

[edited by - Pipo DeClown on May 26, 2004 1:03:07 PM]

• 10
• 17
• 9
• 13
• 41