Jump to content
  • Advertisement
Sign in to follow this  
playtime

Hexagonal maps and fields of view

This topic is 3824 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

When using a hexagonal map system, is there a common method for calculating whether a target hex is in a given field of view when given the source hex, the direction the unit is facing and the bounds of the arc (e.g 30 degrees either side of the centreline of the unit)? I have implemented a method which converts hex coordinates into vectors, along with all the appropriate maths (angle between vectors etc) with a little margin for floating point error. I was curious if there was something more algorithmic rather than mathematical, similar to the method required to calculate range, before I do some more research into the error with unit tests. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!