|
| 05 May 2016 11:16 PM |
| I have no idea on how to make this. Please help and thank you! |
|
|
| Report Abuse |
|
|
dave2011
|
  |
| Joined: 02 Oct 2010 |
| Total Posts: 10581 |
|
| |
|
|
| 05 May 2016 11:18 PM |
| Thank you for your contribution to this thread. |
|
|
| Report Abuse |
|
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
| |
|
|
| 05 May 2016 11:20 PM |
wow guys thanks for helping him jeez
http://blog.roblox.com/2013/07/developers-journal-using-raycasting-to-make-reflectable-lasers/
I think I'm the only person who knows this article exists
|
|
|
| Report Abuse |
|
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
|
| 05 May 2016 11:22 PM |
| Google doesn't love me enough to show me that page when I'm actually looking for it. |
|
|
| Report Abuse |
|
|
|
| 05 May 2016 11:23 PM |
| Looked in one of the scripts of the article's reflecting gun, but I couldn't pinpoint the part where it "reflects". |
|
|
| Report Abuse |
|
|
|
| 05 May 2016 11:23 PM |
I wish the ROBLOX Blog kept that series going with more informative articles on code.
Another good one for newer players:
http://blog.roblox.com/2012/05/using-wait-wisely/
Or even if the Wiki did this more.
But the quality content is few and far between.
Also I've literally looked at every ROBLOX related article posted on Medium, few treasures there including a good explanation of the dot product.
|
|
|
| Report Abuse |
|
|
|
| 05 May 2016 11:25 PM |
Here's the video the guy made on it:
https://www.youtube.com/watch?v=yKyb_wJTaDk
|
|
|
| Report Abuse |
|
|
|
| 05 May 2016 11:26 PM |
Good stuff on the dot product to help you understand it (there's also non-ROBLOX stuff too of course):
http://wiki.roblox.com/index.php?title=Dot_product
and google
"roblox medium dot product"
|
|
|
| Report Abuse |
|
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
|
| 05 May 2016 11:40 PM |
It's the hhtrans segment of the code in the picture.
The function is called on line 267, with variables from earlier. 113-117 is the function that reflects the shot based on the trajectory of the previous positions. If you want me to explain further, I can try, but I haven't bothered using reflection myself. |
|
|
| Report Abuse |
|
|
Salinas23
|
  |
| Joined: 28 Dec 2008 |
| Total Posts: 37142 |
|
|
| 06 May 2016 12:59 AM |
vetors, rays, distances, endpoints, midpoints.
anyone capable of scripting this would ace any matrix algebra test |
|
|
| Report Abuse |
|
|
Jammer622
|
  |
| Joined: 19 Nov 2008 |
| Total Posts: 1739 |
|
| |
|
|
| 06 May 2016 01:41 AM |
Or, you could just use dot product.
http://wiki.roblox.com/index.php?title=Dot_product
Scroll to bottom for final code.
|
|
|
| Report Abuse |
|
|
|
| 06 May 2016 01:42 AM |
Just saw GetTheJobDones post whoops
|
|
|
| Report Abuse |
|
|