Jump to content

Line of sight - objects


tosfera

Recommended Posts

Hi,

I'm trying to see if I can get an interaction working with some objects. It's going quite good but, not every object will be returned as an object type. The processLineOfSight doesn't return an 'object' as type while hovering my mouse over it.

sample code from the wiki;

local w, h = guiGetScreenSize ()

local tx, ty, tz = getWorldFromScreenPosition ( w/2, h/2, 50 )

local px, py, pz = getCameraMatrix()

hit, x, y, z, elementHit = processLineOfSight ( px, py, pz, tx, ty, tz )

if hit then

outputChatBox ( "Looking at " .. x .. ", " .. y .. ", " .. z )

if elementHit then

outputChatBox ( "Hit element " .. getElementType(elementHit) )

end

end

So, is there any way to let your cursor or client or server to reconise these objects while creating a preocess line? ( it's about object; 2813, 2816, 2824 and a few more )

thanks

Link to comment
Correct me if I'm wrong, but while in the editor - when you press E, your crosshair should become red. Doesn't that help in selecting otherwise un-selectable objects?

it does work with the E. What is this bind doing with the cursor in the editor? O_O

edit1; high_sensitivity_mode, I see. time to find out how to enable this by default :D

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...