|
| 27 Dec 2015 10:47 AM |
| I used to be able to make raycasting guns and stuff, but its been a while... (Yes, I've tried using the wiki. But I just woke up. It confused me...) How would I make a simple raycast that can tell if it came in contact with a certain terrain? |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 11:00 AM |
game.Workspace:FindPartonRay()
The Legend of Heroes |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 11:14 AM |
| I know about that part of raycasting yes. But how would I detect if it came in contact with Terrain water? |
|
|
| Report Abuse |
|
|
| |
|
KapKing47
|
  |
| Joined: 09 Sep 2012 |
| Total Posts: 5522 |
|
|
| 27 Dec 2015 12:02 PM |
FindPartOnRay and FindPartOnRayWithIgnoreList both return the following, Hit (Object that intersected with the ray, if any), Pos (Position where the ray ended, whether it was where the ray hit something, or it just ended without hitting anything), NormalVector (The vector to show where the part's surface is facing, the surface that the ray hit, if any object was hit at all), Material (Works for both terrain AND normal parts)
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|