Adjusting a 3D Model's pitch in Zandronum?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Kaminsky
Developer
Posts: 204
Joined: Sun Apr 14, 2013 7:17 pm
Location: Canada

Adjusting a 3D Model's pitch in Zandronum?

#1

Post by Kaminsky » Sun Apr 12, 2015 8:51 pm

I'm experimenting with some 3D models, and I am wondering if I can adjust the model's pitch programmatically.

I've tried to have the model be adjusted to that of the actor's pitch, or otherwise declared in the MODELDEF lump, but I'm not sure that Zandronum supports this aside from adjusting to the actor's yaw.

[spoiler='What I want:]
Image
This is in GZDoom Builder R 2154.
[/spoiler]

[spoiler='What I get:]
Image
This is in Zandronum 2.0.
[/spoiler]


So can a 3D model's inherit an actor's pitch in Zandronum?

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Adjusting a 3D Model's pitch in Zandronum?

#2

Post by Ænima » Mon Apr 13, 2015 12:46 am

How are you trying to set the pitch?

A_SetPitch always works, I had to use it to make those ugly hacky rocket trail models in SST.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
Kaminsky
Developer
Posts: 204
Joined: Sun Apr 14, 2013 7:17 pm
Location: Canada

RE: Adjusting a 3D Model's pitch in Zandronum?

#3

Post by Kaminsky » Mon Apr 13, 2015 1:30 am

Ænima wrote: How are you trying to set the pitch?

A_SetPitch always works, I had to use it to make those ugly hacky rocket trail models in SST.
I've tried to set the pitch using two methods:

1. A_SetPitch

Code: Select all

ACTOR Car 27590
{
 //$Category Vehicles
 //$Sprite TNT1A0
 //$Title "Car"

 +SOLID 
 States
 {
  Spawn:
   CR01 A -1 A_SetPitch(85);
   stop
 }
}
2. MODELDEF

Code: Select all

Model Car
{
 INHERITACTORPITCH
 INHERITACTORROLL

 Path "Models/Cars"
 Model 0 "CAR.md3"
 Skin 0 "CAR.jpg"
 Scale 20.0 20.0 20.0
 PitchOffset 85
 FrameIndex CR01 A 0 0
}
Either of these methods don't seem to work for me. The 3D model's pitch should be forming an 85° with the surface as shown in both examples.

User avatar
Ænima
Addicted to Zandronum
Posts: 3583
Joined: Tue Jun 05, 2012 6:12 pm

RE: Adjusting a 3D Model's pitch in Zandronum?

#4

Post by Ænima » Mon Apr 13, 2015 1:55 am

You know you can't use a DECORATE action until the 2nd tic after spawning, right? Just put a "TNT1 0" as the first state and then your stuff and try it.
Last edited by Ænima on Mon Apr 13, 2015 1:56 am, edited 1 time in total.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

PREPPER
 
Posts: 46
Joined: Fri Oct 26, 2012 9:02 pm

RE: Adjusting a 3D Model's pitch in Zandronum?

#5

Post by PREPPER » Mon Apr 13, 2015 2:27 am

I just edit the model using 3ds or milkshape, if its md2 or md3 format.
Last edited by PREPPER on Mon Apr 13, 2015 2:29 am, edited 1 time in total.

User avatar
Kaminsky
Developer
Posts: 204
Joined: Sun Apr 14, 2013 7:17 pm
Location: Canada

RE: Adjusting a 3D Model's pitch in Zandronum?

#6

Post by Kaminsky » Mon Apr 13, 2015 2:59 am

Ænima wrote: You know you can't use a DECORATE action until the 2nd tic after spawning, right? Just put a "TNT1 0" as the first state and then your stuff and try it.
I completely forgot about that. Anyways, after refurbishing the DECORATE code, the model still does not adjust to the actor's pitch. I am using the INHERITACTORPITCH flag from the MODELDEF lump, which I assume will automatically interpolate to the desired pitch of the actor.
PREPPER wrote: I just edit the model using 3ds or milkshape, if its md2 or md3 format.
The model must always be persistent to the actor's view, so it must be able to be parallel to the pitch angle. Therefore, configuring the model in an editor isn't enough.

User avatar
Dark-Assassin
Maintenence Crew
Posts: 968
Joined: Fri May 25, 2012 4:25 am

RE: Adjusting a 3D Model's pitch in Zandronum?

#7

Post by Dark-Assassin » Mon Apr 13, 2015 8:41 am

INHERITACTORPITCH and INHERITACTORROLL are features that are not in Zandronum's modeling system.
Related Backport Ticket: http://zandronum.com/tracker/view.php?id=519
❗ Don't message me for technical or moderation support.
❔ Use the relevant support channels instead.

Post Reply