to get distance, just take the point that the laser is hitting (pos) and the point that you want to get its distance from, then run V:distance(V)
EDIT: 555th post
I was wondering if anyone can help me. I've seen on tutorials how to link up the LPR to the x, y, z and distance to screens. However on my LPR and on gmod wiki it shows
x
y
z
active
pos
ranger data
I've been playing around now for sometime now trying to get it to display the distance when using the laser pointer, but I can't seem to get it. I've tried using an expression 2 containing pythagorus but still nothing
I'd love some help because I'd like to try and make a laser targeting cannon using projectiles
to get distance, just take the point that the laser is hitting (pos) and the point that you want to get its distance from, then run V:distance(V)
EDIT: 555th post
Last edited by jacoby6000; 07-10-2010 at 03:10 PM.
--Orson Scott CardIn [his] experience that was a sentence never to be uttered except to prove its own inaccuracyI'm not stupid!
Thanks
So I'm after the distance between the receiver and where the laser pointer is hitting
get the recievers position using an entity marker
or use a wirelinkCode:@inputs Receiver:entity Pos:vector @outputs Distance Distance = Receiver:pos():distance(Pos)
Code:@inputs Receiver:wirelink @outputs Distance runOnTick(1) LaserPos = Receiver["Pos",vector] ReceiverPos = Receiver:entity():pos() Distance = ReceiverPos:distance(LaserPos)
--Orson Scott CardIn [his] experience that was a sentence never to be uttered except to prove its own inaccuracyI'm not stupid!
Either place a GPS receiver right next to the receiver, or use a target finder next to the laser pointer receiver to find its GPS coordinates (you could also use an entity marker and a gate that gives the position).
I've not had any luck with the expression
This is what I'm aiming for File:Laserpointer.jpg - GMod Wiki
How would I use the GPS Azrael? I've only ever used it with a Target Finder for a missile
Your explanation of 300mw green laser pointer also helped me ,thanks a lot.
Last edited by danielpower; 08-03-2010 at 09:15 AM.
Does anyone know why 'Distance' was removed from the laser pointer receiver?
Can't you just wire a ranger distance gate to the "ranger data" output? Alternatively:
Code:@inputs R:ranger @outputs Dist interval(->R) Dist = R:distance()
SVN Tutorial
My SVN:Get dropbox and get 250 MB extra space: DropboxCode:http://divranspack.googlecode.com/svn/trunk/%20divranspack/
Bookmarks