|
| 13 Feb 2016 11:09 AM |
Is there a way to increase the width of the ray? I have a projectile that's 3x3x3 and since the ray is infinitively small, if the projectile scrapes a player, the damage wouldn't register. |
|
|
| Report Abuse |
|
|
indeimaus
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 4285 |
|
|
| 13 Feb 2016 11:11 AM |
| use projectiles instead of raycasting at that point |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 11:11 AM |
nop
you could try doing multiple raycasts
"is you dermon?" ~ morashsPeasant |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 11:15 AM |
Technically, rays don't have length either :P
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 11:38 AM |
^ Ik they don't, but like imaginary width. |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Feb 2016 11:43 AM |
Well you can't do this, but you can raycast multiple times.
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 11:45 AM |
| Damn. So have maybe 9 raycasts to cover the size? |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 11:52 AM |
You should just be able to do four. Cast along the edges.
~ Shakespeare's Soggy Left Nut |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 12:34 PM |
| I'll need one more for the middle though. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 12:35 PM |
True.
~ Shakespeare's Soggy Left Nut |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 12:40 PM |
| How do you position the rays so it covers the sides? |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:32 PM |
| Act you're making a ray from the center, but offset it half the height and half the width, making some negative and some positive to get all four corners. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 10:02 PM |
| You could create a hitbox and then then use a raycast to see if there's nothing in the way. |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 11:00 PM |
| What do you mean 'scrapes a player' ? |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Feb 2016 12:13 AM |
| @CrescentJade, because a CFramed BasePart doesn't fire the .Touched event. |
|
|
| Report Abuse |
|
|
|
| 14 Feb 2016 09:25 AM |
^^ Actually I'm rendering projectiles locally so less lag.
And anyways, I finished scripting my raycast for this yesterday. I have 5 rays to check for collision now. 1 in the center, and 4 in the corners. |
|
|
| Report Abuse |
|
|