Tuesday, July 03, 2007

Navigating

I've added two improvements to Ember that I think a lot of people will appreciate. The first is finally putting in checks so that the camera never dips below the terrain. In the end it wasn't that hard to do, I just had to make sure it wouldn't bring everything to a crawl due to massive ray checks. It's still not perfect; when the camera is close to the ground it will still show some of the underworld as it pokes through parts of the terrain. I'll see if I can enhance it to use a more smoother algorithm for positioning the camera a little bit above the terrain.
The other thing I added was terrain decals for showing where the avatar was heading when using the "move to" functionality. It looks really nice and adds some visual hints to the user. Some screenshots of it in action.
Right now it's used for the movement marking only, but it could be used for all kinds of nice in game markings.

2 comments:

rogerdv said...

Ah, decals with ogre! Are you using projective decals method? The ogre wiki tutorial doesnt works for linux.

Erik Hjortsberg said...

No, the PLSM2 engine has a built in decals system, where it creates an extra piece of geometry from the existing terrain data. It works quite well.