Sign in to follow this  
ov3r_dr1v3

speedometer and other stuff

Recommended Posts

Hey... I'm looking to implement some kind of speedometer in my 2D racing game...however im unsure how to do this, i tried drawing it jsut before actually drawing the 2D world, however didnt work. What i want to achieve is to have a speedometer in the bottom left corner of the screen, which is not affected by anything else in the game world. Any help would be fantastic, thanks

Share this post


Link to post
Share on other sites
It sounds like your on the right track, try drawing the speedo as the very last thing to be drawn. Not sure what kind of setup your using and if you have depth testing. But your speedo needs to be on top, so drawing it last makes more sense than first.

Share this post


Link to post
Share on other sites
I'd agree with Honayboyz - draw the speedometer last (unless of course you have other things that you want drawn in a similar manner, which could be drawn before or after it).

I'd simply add to that the suggestion of turning off anything that might interfere with the speedometer being displayed as you want it to be - disable lighting and depth testing, for instance, if either is being used (as I imagine the latter, at least, is). Don't forget to turn them on again once you're done!

Finally, I'd suggest resetting your viewing matrix to something simple, in which you can place the speedometer somewhere similarly simple, such as (0, 0, -2).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this