Jump to content
  • Advertisement


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.

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

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 this post

Link to post
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]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!