|
| 03 Jan 2010 06:13 AM |
| Somebody advanced who knows what he's talking about, and can do it in Lua. And I don't want a script which I can copy and paste, I want a definition and explanation. I'm determined to know about it xD. If possible, send me a PM. |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2010 06:28 AM |
| There is no such thing as raycasting in Lua... |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2010 06:50 AM |
In technality, you can raycast using a bunch of inaccurate math functions...
Raycasting is where you basically create a line and sent it in a certian direction and it keeps going till it hits something. |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 03 Jan 2010 06:51 AM |
You could do this with a bunch of recursives, some magnitude measuring, lag, alot of luck, and some math....
Or you could just send an invisible part out as your raycast... =3 |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2010 06:54 AM |
| ^ That's what I do whenever I rarely raycast =( |
|
|
| Report Abuse |
|
|
totaka1
|
  |
| Joined: 26 Apr 2009 |
| Total Posts: 716 |
|
|
| 03 Jan 2010 07:09 AM |
a=Ray.new(Vector3.new(10,0,0),Vector3.new(0,0,10))
Tah Dah :3 |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 03 Jan 2010 07:13 AM |
| Yes totaka, I've heard of doing that... I've never experimented with it... What does it return if theres something in the way? |
|
|
| Report Abuse |
|
|
totaka1
|
  |
| Joined: 26 Apr 2009 |
| Total Posts: 716 |
|
|
| 03 Jan 2010 07:26 AM |
| absolutely nothing. I don't understand the use for it :3 |
|
|
| Report Abuse |
|
|
ss1122
|
  |
| Joined: 16 Dec 2008 |
| Total Posts: 1601 |
|
| |
|
Vengroe
|
  |
| Joined: 16 Feb 2009 |
| Total Posts: 3057 |
|
|
| 03 Jan 2010 08:16 AM |
I tried using the ray.new thing. I did this: local start = script.Parent local endpoint = workspace.End local ray = Ray.new(start.Position, endpoint.Position) print(ray) (there is an object between start and endpoint)
It printed the startpoint and direction. Until I know what other functions go with it, I can't do anything with it. |
|
|
| Report Abuse |
|
|
nightname
|
  |
| Joined: 10 Jun 2008 |
| Total Posts: 8960 |
|
|
| 03 Jan 2010 08:24 AM |
| This pesky thing. I am still experimenting too. >.< |
|
|
| Report Abuse |
|
|