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 » Scripters
Home Search
 

Re: CFrame hit detection

Previous Thread :: Next Thread 
imnota10 is not online. imnota10
Joined: 25 Dec 2010
Total Posts: 2594
21 Aug 2015 03:23 PM
Trying to make it so that a script can tell when a part being CFramed hits another part. Is there any way to do this, since the touched event doesn't work when CFraming.
Report Abuse
imnota10 is not online. imnota10
Joined: 25 Dec 2010
Total Posts: 2594
21 Aug 2015 05:17 PM
Nothing?
Report Abuse
Ripepperoni is not online. Ripepperoni
Joined: 04 Jul 2010
Total Posts: 5715
21 Aug 2015 05:18 PM
raycast is all you've got in dis case

touched doesn't fire when cframe stuffhappens
Report Abuse
imnota10 is not online. imnota10
Joined: 25 Dec 2010
Total Posts: 2594
21 Aug 2015 09:33 PM
But going off purely from raycasting doesn't really help because there's no way to tell when the bullet reached the person. If I can't tell that then the person could step out of the way and still take damage anyways.
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
21 Aug 2015 09:35 PM
You're moving the bullet in increments. Raycast in increments.
Report Abuse
loomis0523BC is not online. loomis0523BC
Joined: 08 Jan 2015
Total Posts: 764
21 Aug 2015 09:36 PM
try touched then do a if statement useing that part 1 and 2 names when touched they do something


(You cannot have peace without war) Its True.
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
21 Aug 2015 09:37 PM
What Casualist said, segmented raycasting

while true do the do
Report Abuse
TribalDuck is not online. TribalDuck
Joined: 22 Feb 2009
Total Posts: 194
21 Aug 2015 09:38 PM
segmented raycasting is used for stuff like lightning I guess

Never done it before, but I assume you're just raycasting from the endpoint of the last ray, someone can correct me if I'm wrong.


-ChiefDelta/Discommodate/iC7G/Vulnerite + 100 other accounts
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
21 Aug 2015 09:39 PM
An alternative to using Rays would be the method :GetTouchingParts())
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
21 Aug 2015 09:40 PM
"Never done it before, but I assume you're just raycasting from the endpoint of the last ray, someone can correct me if I'm wrong."

Pretty much. It allows for cool bullet drop as well.
Report Abuse
TribalDuck is not online. TribalDuck
Joined: 22 Feb 2009
Total Posts: 194
21 Aug 2015 09:53 PM
I know a guy who did bullet drop recently and apparently it takes a lot of time or something lol.

How do you tell where a ray ends if it doesn't hit anything, just limit the range?


-ChiefDelta/Discommodate/iC7G/Vulnerite + 100 other accounts
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
21 Aug 2015 09:56 PM
@Tribal
"How do you tell where a ray ends if it doesn't hit anything, just limit the range?"
Hence raycasting in intervals, basically you check small intervals for a hit. When you hit something you stop, otherwise you just move on to the next interval and repeat until hit.
Report Abuse
TribalDuck is not online. TribalDuck
Joined: 22 Feb 2009
Total Posts: 194
21 Aug 2015 09:57 PM
Wait but how would that work with something like lightning? You would have to have like 20 invisible bricks which are not cancollide in the sky to fragment it???? Like from one sky layer to the other to give the effect of lightning?


-ChiefDelta/Discommodate/iC7G/Vulnerite + 100 other accounts
Report Abuse
loomis0523BC is not online. loomis0523BC
Joined: 08 Jan 2015
Total Posts: 764
22 Aug 2015 02:15 AM
raycast is only 1 brick


(You cannot have peace without war) Its True.
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
22 Aug 2015 03:35 AM
@loomis A ray isn't a part

Literally all you have to do is to use :GetTouchingParts()
Report Abuse
loomis0523BC is not online. loomis0523BC
Joined: 08 Jan 2015
Total Posts: 764
25 Aug 2015 06:07 PM
ray is a part if your doing raycast dude


(You cannot have peace without war) Its True.
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
25 Aug 2015 06:09 PM
A ray is a instance not a part, a part is a completely separate instance.
Report Abuse
loomis0523BC is not online. loomis0523BC
Joined: 08 Jan 2015
Total Posts: 764
25 Aug 2015 08:13 PM
ok if your useing raycast you have to do Instance.New("Part") for it to make a bullet or hit a brick ...


(You cannot have peace without war) Its True.
Report Abuse
FiveCakes is not online. FiveCakes
Joined: 15 Feb 2012
Total Posts: 5604
25 Aug 2015 08:14 PM
seg. raycasting [3]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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