|
| 20 Jul 2016 12:41 AM |
is a ray cut short if it reaches a part between the start point and the end point? does a ray return more than one part it intersects if not so?
|
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 01:07 AM |
"is a ray cut short if it reaches a part between the start point and the end point?"
I believe you can use an ignore statement for rays to ignore certain objects in the game. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 01:08 AM |
| No, a ray only returns one part, a hit position, and the normal vector of the surface it hit. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 01:37 AM |
ugh damn is there a way to make it not stop until it reaches the endpoint and return many parts?
|
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 01:42 AM |
I've just come up with a solution though someone else might be able to improve upon it.
Let's visualize this:
Part A Part B Part C
The first time, we cast a ray from Part A in the direction of Part B & Part C. It hits, boom, add that to the table of parts that we hit. The second time, we cast a ray from Part A in the direction of Part B & Part C, but this time we have all the parts we've hit in the past (so just Part B right now) in the ignore list. Could work, but raycasting is supposedly expensive so not too sure about how efficient / realistic / practical it is.
|
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 01:43 AM |
thats a good idea. ill try it out. thanks
|
|
|
| Report Abuse |
|
|