Blockeus
|
  |
| Joined: 21 May 2012 |
| Total Posts: 297 |
|
|
| 27 May 2013 10:37 AM |
rayPart.CFrame = CFrame.new(position, tool.Handle.CFrame.p) * CFrame.new(0, 0, -distance/2)
Lineof Code Found --- http://wiki.roblox.com/index.php/How_to_Make_a_Raycasting_Lasergun
I dont get why it has to be cframe at the tools handle liek that looks confusing.
Especially make the distance negative and dividing it by two and why i need the position. |
|
|
| Report Abuse |
|
|
| 27 May 2013 11:10 AM |
Yes,
If it were easy, a chimp would do it....
Sorry u will just have to look-up every word & method in the Wiki.... Hey this is just like school, isn't it:
rayPart.CFrame = CFrame.new(position, tool.Handle.CFrame.p) * CFrame.new(0, 0, -distance/2)
rayPart is just this program's name for a Part in Space
CFrame is a completely described Postion AND Angle.
Make a New Cframe.
CFrame.new(position, tool.Handle.CFrame.p), with the comma is a Special Method, which always Positions something at 'position', and Looks-at, the second argument (Tool).
* for CFrames is NOT a Multiplication sign. Look-up CFrame in the Wiki.... In this case it moves the CFrame to another position; an offset; or a relative position.
distance/2 is halfway between where the laser Hit, and the Tool, so put the Center Point of our nice, long, Raypart THERE.
GL (Read the WIKI over & over & over.......It's all in there) Bri
|
|
|
| Report Abuse |
|