Jump to content

Set object visible from far


Recommended Posts

Posted
You're talking about draw distance, you can set the draw distance of everything with this function:
setFarClipDistance 

Well, thanks for that function. It's very beautiful to see the GTA world like that but It doesn't work for my object.

Check out the screenshot.

3DwrR.jpg

As you can see, I've a object but he is like in alpha or smthg like that because i'm too far.

I can see the GTA world very well but not the object.

Idea?

Posted
I'm not really sure, but maybe this one:
engineSetModelLODDistance 

*CLIENT SIDE ONLY*

Hmm still not working :/

  
-- creating world 
        for i, object in ipairs(room.objects)do 
            local obj = createObject(object.model, object.x, object.y, object.z, object.rx, object.ry, object.rz) 
            engineSetModelLODDistance (object.model, 170) 
            setElementDimension(obj, room.id) 
            table.insert(Objects, obj) 
        end 
  

Posted
I'm not really sure, but maybe this one:
engineSetModelLODDistance 

*CLIENT SIDE ONLY*

Hmm still not working :/

  
-- creating world 
        for i, object in ipairs(room.objects)do 
            local obj = createObject(object.model, object.x, object.y, object.z, object.rx, object.ry, object.rz) 
            engineSetModelLODDistance (object.model, 170) 
            setElementDimension(obj, room.id) 
            table.insert(Objects, obj) 
        end 
  

What's the object name?

i mean like this

local theObjectName createObject(...) 

Posted

because the object name is very different in these functions

-- creating world 
        for i, object in ipairs(room.objects)do 
            local obj = createObject(object.model, object.x, object.y, object.z, object.rx, object.ry, object.rz) 
            engineSetModelLODDistance (object.model, 170) 
            setElementDimension(obj, room.id) 
            table.insert(Objects, obj) 
        end 
  

Posted
You did it client side?

Yes it's client-side.

Edit: And the last argument of the createObject? What it means?

isLowLOD: A bool value specifying if the object will be low LOD. A low LOD object has no collision and a longer draw distance.
Posted (edited)

Okay it works now.

For peoples who have the same problem, just set true the last argument of the createObject.

Thanks Castillo for your help and 6ArHxiMr'3a[Z]eF for your useless posts.

Edited by Guest
Posted

Simply create 2 objects in the same place. One with isLowLOD set to true and another one set to false.

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