Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
hardcore_gamer

3D gun looks weird in first person view

Recommended Posts

I made a 3D weapon with PBR textures but for some reason the weapon model looks messed up in first person view after it's been picked up (the magazine appears on the wrong side of the gun for example) where as it seems to look fine while it's still just floating.

 

Here are 2 screens:


 

Spoiler

 

u7UAhge.jpg

 

Rf40sK1.jpg

 

Here is a screenshot from MisFitmodel3D with the magazine on the left like it's suppose to:

 

2SP9ctK.png

 

Any idea what is causing the weapon to look all wrong in first person view?

Edited by hardcore_gamer

Share this post


Link to post

Can you post your DECORATE/ZScript code for your weapon as well as your MODELDEF?

 

Share this post


Link to post
19 minutes ago, R4L said:

Can you post your DECORATE/ZScript code for your weapon as well as your MODELDEF?

 

 

Decorate:

 

Actor placegun : weapon 11004

{

Radius 16
Height 16
Weapon.SelectionOrder 1
Weapon.AmmoGive 30
Weapon.SlotNumber 3
Weapon.AmmoType "shell"
Inventory.PickupMessage "$GOTSHOTGUN2"
Weapon.AmmoUse 1
Weapon.KickBack 10
Weapon.SlotPriority 1
+NOGRAVITY
States
{
Spawn:
    MERC A -1
    stop
Ready:
    MERC A 1 A_WeaponReady
    loop
Deselect:
    MERC A 1 A_Lower
    loop
Select:
    MERC A 1 A_Raise
    loop
Fire:
    MERC A 2 A_FireBullets (13.4, 9.2, 50, 10, "BulletPuff")
    MERC A 0 A_Gunflash
    MERC A 2 A_Checkreload
    MERC A 2 A_Refire
    Goto Ready

}

}

 

Modeldef:

 

Model placegun
{

Path "Models/placegun"
Model 0 "placegun.md3"
scale 50 50 50
ROTATING
frameindex MERC A 0 0

}

Share this post


Link to post

Only thing I can think of is that when the model is in the player viewport it behaves differently. My models in Metroid Dreadnought had to be flipped upside down and placed in the top left quadrant in Blender to display correctly as a HUD gun.

 

Also, I'd make a separate model for the pickup. That way the HUD gun doesn't have the ROTATING flag.

Edited by R4L

Share this post


Link to post

To give you a better idea of what the problem is, here is another screenshot with the model moved further away from the player so you can see the whole thing. As you can see, for some reason the magazine is on the right of the gun (btw I completely redid the UV's and gave it a quick retexturing to see if that had something to do with the problem, but it did not fix it) and not on the left where it belongs. It's very weird.

 

EDIT: Dear lord I have tried everything I can think off and I have no idea what is causing this. Like, the whole model works but ONLY the magazine is located on the wrong side of the gun for some reason.

 

48ewEKG.jpg

Edited by hardcore_gamer

Share this post


Link to post
4 minutes ago, kb1 said:

Reverse the source model, maybe?

 

Reverse it how? The magazine is suppose to be on the left side but for some reason it's on the right side. Reversing the gun changes nothing.

 

EDIT: Here is what the gun is suppose to look like (screenshot is taken from MisfitModel3D)

 

2SP9ctK.png

Share this post


Link to post
21 minutes ago, EarthQuake said:

Try this:


Model placegun
{
	Path "Models/placegun"
	Model 0 "placegun.md3"
	scale -50 50 50
	ROTATING
	frameindex MERC A 0 0
}

Source

 

That worked!

 

It's really weird you would have to do this though :/

Share this post


Link to post

So the DECORATE is doing the reversing with the "scale -50"? What I meant was to put the magazine on the right in the model, so in game it would show on the left, since it seems that the game is reversing the model for some reason. the "-50" is kinda doing the same thing, after the fact.

 

I'm curious why it's reversed in the first place. Maybe it's related to Doom's ability to reverse sprites? Just a guess. Strange, indeed. I'm glad you've got a reliable fix!

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
×