Jump to content

getElementsWithinColShape client - server bug


pa3ck

Recommended Posts

Posted

Hey. After spending a good few minutes trying to solve my problem, I found out that getElementsWithinColShape isn't working client side for some reason. It works perfectly fine on server side though... I guess it's a bug, isn't it?

addCommandHandler ( "ttt", function (  ) 
  
    local x, y, z = getElementPosition ( localPlayer ) 
    local sphere = createColSphere ( x, y, z - 1, 2 ) 
     
    local vehs = getElementsWithinColShape ( sphere ) 
    outputChatBox ( tostring ( #vehs ) ) -- always 0 client side, but I get the correct number of elements server side. 
     
end)  

  • Moderators
Posted

Must be a bug, clientside should be must better in detecting colshapes then serverside. Serverside must live from streamed data from the clients.

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