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
|
  |
| Joined: 25 Dec 2010 |
| Total Posts: 2594 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 21 Aug 2015 09:37 PM |
What Casualist said, segmented raycasting
while true do the do |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 22 Aug 2015 02:15 AM |
raycast is only 1 brick
(You cannot have peace without war) Its True. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 15 Feb 2012 |
| Total Posts: 5604 |
|
| |
|