Sign in to follow this  
Guest JeanLuc_

MAKE_NEEDLE in C gauge distorting texture!

Recommended Posts

I am adding a compass card to a VOR gauge. I have implemented the card as a needle so I don't have to mess with masks etc. However, it seems to be distorting the texture as it rotates. At 0 rotation it looks great, but as it turns it sort of flattens out the bottom edge of the circular texture and squeezes it vertically. It's quite bizarre looking.There are no limitations for needle texture sizes are there? Even so, it should be under that limit.Has anyone ever experienced this?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hey Ryan,Check your non-linearity table. If the coordinates are too close to the center of the rotation, and in your caseit sounds like it is actually smaller in some points than the card radius, it will behave as described above. Keep in mind these coordinates don't have to lie on the perimeter of where you want the needle (card) to point to. Meaning you can (and should) place the coordinate points on a region outside of the card radius.

Share this post


Link to post
Share on other sites

Thanks,There's no non-linearity table, but I got it fixed. I resized the card so the x and y dimensions are the same. Seemed to do the trick!Thanks again,Ryan

Share this post


Link to post
Share on other sites

A MAKE_NEEDLE bitmap can never be outside the panel bitmap, so if the bitmap is rotated say 45

Share this post


Link to post
Share on other sites

The only problem with MAKE_SPRITES instead of MAKE_NEEDLES is that1) they are less anti aliased when rotated2) they take as much as twice the CPU cycles to rotate them because the mask is also rotated, while the needle mask is automatically derived from the rotated needle bitmap.When you have many of them, it counts on the FS FPS.Hope this helps!

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