Hello,
I am trying to implement a scanner for a spaceship. What I want is something like Privateer had. Basically, it is a circle with dots on it where the dots represent objects in space, like planets, ships, etc. The dots in the center are in front of the ship, the dots near the outer edges are behind the ship, and the dots about half-way from the center to the outer edge are beside the ship. So, if there is a dot towards the top of the circle you would pull up to get it in front of you and so on.
I have been experimenting with various functions like getHorizontalAngle(); but, nothing seems to work. The most I can get is coordinates and angles relative to the world and not to the ship. I think I need to do some sort of rotation; but, I am lousy with 3d math. (For the most part, Irrlicht handles most of it so life is good.)
I am thinking that I need to use polar coordinates where the front of the ship is 0,0.
Thanks!
Brian
Spaceship Scanner/Radar
Re: Spaceship Scanner/Radar
I do believe I saw something like that when I did a search for 'radar' and 'HUD' ...
Since you are scanning from a spaceship you are originally in 3d coords, theres a simple formula to convert to 2d... yes I would have to break out my old college algebra book to find it or I could google it. then its all just to aplying it to 2d (tutorial 6 for example).
Grumpy
Since you are scanning from a spaceship you are originally in 3d coords, theres a simple formula to convert to 2d... yes I would have to break out my old college algebra book to find it or I could google it. then its all just to aplying it to 2d (tutorial 6 for example).
Grumpy
code happens
-
reifsnyderb
- Posts: 45
- Joined: Wed Oct 29, 2008 6:03 pm
Re: Spaceship Scanner/Radar
Hello,
I did the search. While there are some tidbits about radar, they seem to be mostly about a 2d overhead view type scenario. I am looking for something similar to projecting a radar cone out of the front of the space ship.
Thanks,
Brian
[quote="Grumpy"]I do believe I saw something like that when I did a search for 'radar' and 'HUD' ...
Since you are scanning from a spaceship you are originally in 3d coords, theres a simple formula to convert to 2d... yes I would have to break out my old college algebra book to find it or I could google it. then its all just to aplying it to 2d (tutorial 6 for example).
Grumpy[/quote]
I did the search. While there are some tidbits about radar, they seem to be mostly about a 2d overhead view type scenario. I am looking for something similar to projecting a radar cone out of the front of the space ship.
Thanks,
Brian
[quote="Grumpy"]I do believe I saw something like that when I did a search for 'radar' and 'HUD' ...
Since you are scanning from a spaceship you are originally in 3d coords, theres a simple formula to convert to 2d... yes I would have to break out my old college algebra book to find it or I could google it. then its all just to aplying it to 2d (tutorial 6 for example).
Grumpy[/quote]
-
reifsnyderb
- Posts: 45
- Joined: Wed Oct 29, 2008 6:03 pm
Re: Spaceship Scanner/Radar
I've got the problem partially resolved. Using this example (http://irrlicht.sourceforge.net/forum/v ... hp?t=32269) I am able to determine what the angle of the target is from the front of the ship. Now, I think I just need to convert it to polar coordinates and plot it in a "scanner".
Regards,
Brian
Regards,
Brian