Jump to content

Matrix rays


Drakath

Recommended Posts

local t_Matrix = getElementMatrix (t_Data.ped) 
local int_RayX = t_Matrix[2][1] + t_Matrix[4][1] 
local int_RayY = t_Matrix[2][2] + t_Matrix[4][2] 
local int_RayZ = t_Matrix[2][3] + t_Matrix[4][3] 
for i = 1, 10 do 
local intSourceX, intSourceY, intSourceZ = t_PedPos[1], t_PedPos[2], t_PedPos[3] 
local intTargetX, intTargetY, intTargetZ = int_RayX, int_RayY, int_RayZ - 0.2 + i*0.2 
dxDrawLine3D (intSourceX, intSourceY, intSourceZ, intTargetX, intTargetY, intTargetZ, tocolor(255,0,0,255)) 
end 
  

This script draws 10 lines of 1 meter length. How can I increase that length to 3 meters?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...