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 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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*

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

You did it client side?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

To Visit Us

Press Here: mtasa://5.9.206.180:22002

b648040241b8f01.png

0d0a7bb38ca13e5.png

Posted

Why do you need to know that?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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 
  

To Visit Us

Press Here: mtasa://5.9.206.180:22002

b648040241b8f01.png

0d0a7bb38ca13e5.png

Posted

Oh dear... why do you even post without knowing anything about it? engineSetModelLODDistance uses a model, not an element.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

He has no idea about what he's talking about, he's just trying to increase his post count.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I'm not sure, maybe try removing low lod when the element streams in?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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