Jump to content

Recommended Posts

I found a problem with my scarecrow mod (https://steamcommunity.com/sharedfiles/filedetails/?id=522640509) where it spawns birds around it periodically, but if you place it too close to the water, 2 bad things happen:

  1. some birds get stuck in mid flight on the border between land and water
  2. some birds actually land on the ocean

I am generating a point by taking a random angle and a random radius away from the scarecrow and then using the BirdSpawner to spawn a bird at that point. Obviously what's happening is if the scarecrow is too close to the water then the random point is *in* the water and then it tells the BirdSpawner to spawn a bird there.

There's got to be some kind of way to determine if a point is in the ocean, right? Does anyone know how?

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
×
  • Create New...