3D model weapon rotate

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Azure Agony
Posts: 71
Joined: Fri Aug 24, 2007 6:40
Location: Somewhere in HANGAR or E4M7

3D model weapon rotate

Post by Azure Agony »

Hi! I wasn't sure where I should post this question, cause it's not a bug in game. I got problem/question, I made weapon 3D model and when I summon it on map it's rotating (like in quake). Can I disable rotating for weapons? (it's good for deathmatch not for place where it shuold lies and wait for player).
Thanks!
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Can you post your modeldef? I've just tried a few examples and the only ones that rotate are the ones that specifically say "ROTATING" in the modeldef. Everything I tried was a weapon, so it's not just because your item is one.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Did you make sure to define only one frame for the model? Though this is very unlikely, the model could have been rotate-animated by hand and because you defined all of the frames in the MODELDEF, GZDoom happily animates the model...
User avatar
Azure Agony
Posts: 71
Joined: Fri Aug 24, 2007 6:40
Location: Somewhere in HANGAR or E4M7

Post by Azure Agony »

Ok, here it is:
MODELDEF

Model AXE
{
Path "models"
Model 0 "FIREAXE.md3"
Skin 0 "FIREAXE.jpg"
Scale 0.25 0.25 0.25

FrameIndex POSS A 0 0
}
-------------------------------------

And here is decorate for this model:

ACTOR AXE: Fireaxe 20146
{

States
{
Spawn:
POSS A -1
Stop
}
}
--------------------------------------
And here is decorate for weapon:

ACTOR Fireaxe : Weapon
{
Weapon.SelectionOrder 3700
Inventory.PickupMessage "YOU GOT THE FIREAXE!"
Inventory.PickupSound "Pickup"
Weapon.Kickback 100
decal axehitchip
Obituary "AXE MURDERED!!!"
+WEAPON.WIMPY_WEAPON
+WEAPON.MELEEWEAPON
States
{
Ready:
FAXE A 1 A_WeaponReady
Loop
Deselect:
FAXE A 1 A_Lower
Loop
Select:
FAXE A 1 A_Raise
Loop
Fire:
FAXE B 3 A_PlaySoundEx("weapons/axeswing","Weapon",0)
FAXE C 4
FAXE D 12 A_CustomPunch(30,1,0,"AxeHitPuff")
FAXE C 5
FAXE B 5
FAXE A 5
Goto Ready
Altfire:
FAXE E 2 A_PlaySoundEx("weapons/axewhoosh","Weapon",0)
FAXE F 3
FAXE G 8 A_CustomPunch(22,1,0,"AxeHitPuff")
FAXE F 5
FAXE E 5
FAXE A 5
Goto Ready
//Normally for sprite weapon here is smth like this:
// Spawn:
// AXE1 A -1
// Stop
//For 3d model I don't use it (and it works)
}
}
---------------------------------------------------
If any 3D model type is weapon it start to rotate.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Well, I can't see anything obvious in there. You say it happens for any model you set to be a 3D model. There isn't a global setting of "weapon rotate" or something is there? I couldn't see one, but that doesn't mean it isn't there.

And just a double check, this is GZdoom as opposed to Skulltag or something which may have additional options?


And purely out of interest, why do you define a new actor with a spawn state for the model? You could just set up your actor to use the weapon's normal spawn state and the AXE1 sprite instead of POSS and make the modeldef reference the Fireaxe actor instead of Axe.
User avatar
Azure Agony
Posts: 71
Joined: Fri Aug 24, 2007 6:40
Location: Somewhere in HANGAR or E4M7

Post by Azure Agony »

No, no it happens for models with WEAPON state (others models work fine). Yes, I was thinking about look into the skulltag. About model define it's true :) new actor is needless (I forgot about that, thanks for remind) :)
User avatar
Azure Agony
Posts: 71
Joined: Fri Aug 24, 2007 6:40
Location: Somewhere in HANGAR or E4M7

Post by Azure Agony »

I still didn't find resolve this problem (but I got idea to make it with scripts and fake item).
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

That really shouldn't be necessary. The model shouldn't be rotating unless you've told it to. So somehow something must be set somewhere to make that the case. Unfortunately, I'm all out of clues as to why it's happening. :(

Would you be able to package up a very small sample PK3 with the model in it plus its associated decorate and modeldef so that others could load it up and see what happens on their system?
User avatar
Azure Agony
Posts: 71
Joined: Fri Aug 24, 2007 6:40
Location: Somewhere in HANGAR or E4M7

Post by Azure Agony »

Oh my Goodness, I found what was wrong! :D I started GZDoom today, summoned Axe and... it doesn't rotate! I said what the hell? :) Then (about 2 hours later) my friend call me and tell that he installed old version of GZDoom (few days ago) to take screenshots from map and he forgot to reinstal GZDoom 1.0.30, and he did it just today morning! :D:D
But, I have to say it: THANKS FOR ALL HELP GUYS!!!
Locked

Return to “GZDoom”