|
| 12 Sep 2017 08:35 PM |
| Not sure what it is, I keep hearing it in high level scripting conversations. |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2017 08:39 PM |
Its not really high level
http://wiki.roblox.com/index.php?title=Raycasting
http://wiki.roblox.com/index.php?title=Raycasting_Basics
local raycast = Ray.new( startposition, -- where the raycast starts, point a endposition -- where it raycast ends, point b ) local parthit = Workspace:FindPartOnRay(raycast) -- parthit is the object the ray hit.
if parthit then -- check if parthit exists (ray actually hit something between point a and b) print(parthit) end
attempt to index global 'soul' (a nil value) |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2017 08:45 PM |
^
discord.gg/fissy Scripters' Academy Discord (just starting up): discord.gg/VrbkYPs yeah yeah multiply that math.random by the vector3 to get the cframe and use them htmls to bypass the mainframe of the mysql yeah |
|
|
| Report Abuse |
|
|
kennydies
|
  |
| Joined: 15 Nov 2008 |
| Total Posts: 825 |
|
|
| 12 Sep 2017 09:00 PM |
sinister is wrong. the second argument in the ray constructor is a direction, not a position.
|
|
|
| Report Abuse |
|
|
|
| 12 Sep 2017 09:01 PM |
true
discord.gg/fissy Scripters' Academy Discord (just starting up): discord.gg/VrbkYPs yeah yeah multiply that math.random by the vector3 to get the cframe and use them htmls to bypass the mainframe of the mysql yeah |
|
|
| Report Abuse |
|
|
kennydies
|
  |
| Joined: 15 Nov 2008 |
| Total Posts: 825 |
|
|
| 12 Sep 2017 09:02 PM |
Oh, and since nobody really provided an explanation of what raycasting actually is:
Effectively you're shooting a beam from a position in a certain direction to see what it hits. It's useful for stuff like guns where you want to shoot towards the mouse to see if the player clicked on another player, and thus you need to damage them.
|
|
|
| Report Abuse |
|
|
OAuth2
|
  |
| Joined: 27 Nov 2016 |
| Total Posts: 751 |
|
|
| 12 Sep 2017 09:29 PM |
The second argument for Ray.new isn't the end position, but a direction. If you want to get the direction of where your mouse hits: (Mouse.Hit.p - Camera.CFrame.p).unit * distance |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2017 09:31 PM |
oh my god what an og namesnipe
discord.gg/fissy Scripters' Academy Discord (just starting up): discord.gg/VrbkYPs yeah yeah multiply that math.random by the vector3 to get the cframe and use them htmls to bypass the mainframe of the mysql yeah |
|
|
| Report Abuse |
|
|