chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
|
| 01 Nov 2015 12:32 AM |
So im trying to cast a ray towards each of the vertices is this the right math?
local function GetNeighbor(Hex, Direction, Ignore) local Ray = Ray.new(Hex.Position, Hex.Position + Vector3.new(Hex.Position.X + math.sin(2 * math.pi / 6 * Direction))) if not Ignore then Ignore = {} end table.insert(Ignore, Hex) return game.Workspace:FindPartOnRayWithIgnoreList(Ray, Ignore) end |
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
| |
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 01 Nov 2015 01:02 AM |
| Does it work? Your other post has a few different approaches to your issue. |
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
|
| 01 Nov 2015 01:03 AM |
so I had this in it: Hex.Position.Y + math.cos(2 * math.pi / 6 * Direction))
However it only worked in one direction so, I guessing I just need to flip it? idk |
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
| |
|