Sign in to follow this  
KeksKing

DFF-Model is invisible (glitch?)

Recommended Posts

Hello friend!

I tried to put this mod (https://www.gtainside.com/en/sanandreas/maps/95647-mario-kart-double-dash-mushroom-bridge/stats/) to the server for that i script.

I put this mod to the editor_main resource so i can map these two mod-objects together.

In the map editor it worked without any problems - but now when i try to put this map+mods to the servers resource on i got this glitch:

(happends only when the camera is in this area and in a at a certain angle)

mta-screen_2019-04-17_19-20-16.png

mta-screen_2019-04-17_19-20-15.png

Script:

local Driftmods = {
	--Mushroom Bridge
	[1] = {
		{"(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge.col", 2967},
		{"(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge.txd", 2967},
		{"(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge2.col", 2992},
		{"(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge.txd", 2992},
		{"(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge1.dff", 2967, 300},
		{"(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge2.dff", 2992, 300},
	}
}



for i, v in ipairs(Driftmods) do
	
	for i, replace_ in pairs(Driftmods[i]) do
		local File = replace_[1]
		if string.find(File, "dff") then
			replace_.dff = engineLoadDFF(File, 0)
			if replace_.dff then
				engineReplaceModel(replace_.dff, replace_[2])
				engineSetModelLODDistance(replace_[2], replace_[3])
			end
		end
		if string.find(File, "txd") then
			replace_.txd = engineLoadTXD(File)
			if replace_.txd then
				engineImportTXD(replace_.txd, replace_[2])
			end
		end
		if string.find(File, "col") then
			replace_.col = engineLoadCOL(File)
			if replace_.col then
				engineReplaceCOL(replace_.col, replace_[2])
			end
		end
	end
	
end




--META
<file src="(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge.col" />
<file src="(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge2.col" />
<file src="(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge1.dff" />
<file src="(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge2.dff" />
<file src="(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge.txd" />
<map src="(Maps)/Drift/Mushroom_Bridge/Mushroom_Bridge.map" />
	
<script src="(Maps)/Drift/replacer.lua" type="client" />

 

I hope someone can help me with this problem :(

Share this post


Link to post
37 minutes ago, KeksKing said:

Thanks for your answer, @stPatrick!

But 


setOcclusionsEnabled(false)

doesnt change anything.

Then try to inscare the load distance.

engineSetModelLODDistance(YOUR_MODEL_ID, 300) 

(I think your model is too big, and if you go far from the center, the object is unloading.)

  • Like 1

Share this post


Link to post
Posted (edited)

Typically it's either that the model does not have a proper LOD, or collisions are wrong.

Try assigning a lod (Create a duplicate of the model with LOD set to true and assign it)

Edited by CodyJ(L)
  • Like 1

Share this post


Link to post

i have downloaded the map and seen that the collision file contains 2 models, however MTA can only load 1 of them. not sure if you've done it already, but here you have both of the collision models. if this doesn't solve the problem, please hit me up on Discord Corder RS #3423 and i'll try to help fixing the issue

@KeksKing

https://cdn.discordapp.com/attachments/308955200876707840/568230050311438375/collisions.rar

  • Like 1

Share this post


Link to post

@Tut

Yea, i exported already the two collisions from the col file in two seperate files.

 

@CodyJ(L)

How can i set the LOD to true?

 

 

Thanks for the answers :)!

Share this post


Link to post
Posted (edited)
On 17/04/2019 at 18:01, CodyJ(L) said:

Typically it's either that the model does not have a proper LOD, or collisions are wrong.

Try assigning a lod (Create a duplicate of the model with LOD set to true and assign it)

Agreed, I was gonna say the problem's probably in your .COL file.
Or try importing the .DFF to a different model number, especially if the .COL file's not being replaced also.

Edited by JustinMTA

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.