generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Raycasting

Previous Thread :: Next Thread 
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
02 Feb 2012 07:48 PM
How come the ray's angle is tilted slightly up?
I know this for the the fact I place parts where the collision is.

for Angle = 90, 360, 90 do

for x = 1, 100 do
if Pos == nil then
wait()

local Ray = Ray.new(script.Parent.Position, CFrame.Angles(math.rad(80), 0, math.rad(Angle)) * (script.Parent.CFrame.p.unit * x))
local hit, position = game.Workspace:FindPartOnRay(Ray)

if hit then
Pos = position
end
end
end

if Pos ~= nil then
local Part = Instance.new("Part")
Part.Position = Pos
Part.Anchored = true
Part.Parent = game.Workspace
end

Pos = nil
end
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
02 Feb 2012 07:49 PM
* math.rad(90)
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
02 Feb 2012 08:00 PM
Lul this nub does not know how to raycast, but rad is weird. I tried using it with CFrame and it does not rotate right. It did not rotate 90 degrees like I wanted it to.

[=|I rate myself 6.5/10 in RBLX.Lua|=]
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
02 Feb 2012 08:03 PM
I know HOW to raycast,
but I can't do it well.
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
02 Feb 2012 08:12 PM
I was talking about me, sorry for the confusion.

[=|I rate myself 6.5/10 in RBLX.Lua|=]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
02 Feb 2012 08:13 PM
try 89 degrees or something of that sort instead.

[=|I rate myself 6.5/10 in RBLX.Lua|=]
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
02 Feb 2012 09:06 PM
Tried,
but it didn't work.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
02 Feb 2012 09:08 PM
Maybe I'll just use parts and .Touched.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image