Hi all,
If I am using this,
Mouse_Pick_Shoot:
Set Current Camera 0
If mouseclick() = 1 and ShipD# < 100
If pick object(mousex(),mousey(),201,201)>0
`Fire weapon
setPlaneLine(1,Object Position X (200)+.25,Object Position Y (200)+.25,Object Position Z (200)+.25,Object Position X (201),Object Position Y (201),Object Position Z (201),2.5)
EndIf
EndIf
return
with this,
function setPlaneLine(obj,x1,y1,z1,x2,y2,z2, thickness)
dx = (x2-x1)
dy = (y2-y1)
dz = (z2-z1)
x3 = x1 + dx*0.5
y3 = y1 + dy*0.5
z3 = z1 + dz*0.5
d = sqrt(dx*dx + dy*dy + dz*dz)
position object obj, x3,y3,z3
point object obj, x2,y2,z2
scale object obj, d, thickness,5
endfunction
To make a textured plain to act as a laser.
My question is; why is it \"jittery\"? The Object 200 end of the plane jumps around a lot.
Mike
put this in your code snippets, code lang = dbp