Jump to content

MaterialLine3d Rotation


enzoDs

Recommended Posts

bool dxDrawMaterialLine3D ( float startX, float startY, float startZ, float endX, float endY, float endZ, element material, float width,
                          [ int color = white, [ bool postGUI = false, ] float faceTowardX, float faceTowardY, float faceTowardZ ] )

faceTowardX, faceTowardY, faceTowardZ

  • Thanks 1
Link to comment
  • Moderators
11 hours ago, enzoDs said:

rotate a dxDrawMaterialLine3D in x,y,z

 

This information might also be useful for you:

 

local x, y, z = 0, 0, 10
local rx, ry, rz = 0, 0, 0

-- test
rx, ry, rz = (rx + math.random(3)) % 360, (ry + math.random(3)) % 360, (rz + math.random(3)) % 360
--


local m = createMatrix(x, y, z, rx, ry, rz )

local startX, startY, startZ = getPositionFromMatrixOffset(m, 0, 1, 0)
local endX, endY, endZ = getPositionFromMatrixOffset(m, 0, -1, 0)
local faceTowardX, faceTowardY, faceTowardZ = getPositionFromMatrixOffset(m, 1, 0, 0)

(functions are on that topic)

 

 

Edited by IIYAMA
  • Thanks 2
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...