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 occlusion how to 2 things

Previous Thread :: Next Thread 
Jellal is not online. Jellal
Joined: 11 Jun 2010
Total Posts: 15
03 Jul 2014 06:05 PM
How 2 occlude more than 1 thing from raycast pls

the 2nd argument is what the ray ignores, i tried making that a table, but surprisingly dat doesnt work. I want to ignore both the bulletz and the character, but when da bullets r parented to da char they go invisible when u zoom in cuz its local to u. i need to occlude both the player character and da bullet without making the bullet local to u (in workspace) it sux cuz your bullets keep hitting your last bullet when they arent local to you. help pls i luv u much

tl;dr version: how 2 make last argument two things instead of one

code below pls
------------------------------------------------
local hit, position = game.Workspace:FindPartOnRay(ray, Player.Character)
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
03 Jul 2014 06:39 PM
Game.Workspace:FindPartOnRayWithIgnoreList(ray, ignore table, b00l terraincells)
Report Abuse
LegitimateBuisness is not online. LegitimateBuisness
Joined: 18 Feb 2014
Total Posts: 34
03 Jul 2014 06:40 PM
local ignore = {'game.Workspace.Thing', game.Players.LocalPlayer.Character, etc};
game.Workspace:FindPartOnRayWithIgnoreList(ray, ignore, false);
Report Abuse
Jellal is not online. Jellal
Joined: 11 Jun 2010
Total Posts: 15
03 Jul 2014 06:48 PM
Thanks, what does the third 'false' mean? The wiki on raycasting is pretty bad. I think you have the wrong language with ";" btw XD too used to C/Java? :3
Report Abuse
LegitimateBuisness is not online. LegitimateBuisness
Joined: 18 Feb 2014
Total Posts: 34
03 Jul 2014 06:54 PM
Nah. :3

Semi-Colons are used in Lua also. :p
Report Abuse
Jellal is not online. Jellal
Joined: 11 Jun 2010
Total Posts: 15
03 Jul 2014 06:59 PM
Problem is the gun fires fast and it doesn't ignore all the previous bullets fired though. Is there a way to occlude things actually named Bullet?

If not I'll just remove the bullet immediately if it hits something that can be hurt. I guess it doesn't matter too much.
Report Abuse
LegitimateBuisness is not online. LegitimateBuisness
Joined: 18 Feb 2014
Total Posts: 34
03 Jul 2014 07:31 PM
ignore = {'game.Workspace.Whatever', 'game.Workspace:FindFirstChild("Bullet")'};
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
03 Jul 2014 07:40 PM
*Put all bullets in a model.

*Add that model to the ignore list.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
03 Jul 2014 08:08 PM
The last "false" is whether or not it will detect terrain
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
03 Jul 2014 08:26 PM
The last "false" is whether or not it will detect terrain

Actually, I am quite sure if if it assumes the terrain to be JUST cubes, rather than cube/wedge hybrid.
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