brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 19 Nov 2012 11:10 PM |
Right now this shoots a ray from the front of the arrow, How can I make it shoot from diffrent angles such as the bottom?
local ray = Ray.new(Arrow.Position, (Arrow.CFrame.lookVector).unit * 3) local Hit, Pos = Workspace:FindPartOnRay(ray, Arrow)
|
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 19 Nov 2012 11:12 PM |
| Arrow.CFrame.lookVector:cross(Vector3.new(0,1,0)) --[[ turns right, -1 left, modify the Vector3 more for other angles.]] |
|
|
| Report Abuse |
|
|
brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 19 Nov 2012 11:14 PM |
local ray = Ray.new(Arrow.CFrame.lookVector:cross(Vector3.new(0,1,0))
This look right? |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 19 Nov 2012 11:16 PM |
| No add Arrow.Position, infront of the lookVector piece then multiply the lookVector by how far you want the ray to go. |
|
|
| Report Abuse |
|
|
brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 19 Nov 2012 11:20 PM |
local ray = Ray.new(Arrow.Position, Arrow.CFrame.lookVector:cross(Vector3.new(0,1,0.unit * 3))
Good? |
|
|
| Report Abuse |
|
|
brayden99
|
  |
| Joined: 30 Sep 2007 |
| Total Posts: 1243 |
|
|
| 19 Nov 2012 11:21 PM |
Sorry, I ment
local ray = Ray.new(Arrow.Position, Arrow.CFrame.lookVector:cross(Vector3.new(0,1,0).unit * 3)) |
|
|
| Report Abuse |
|
|