Page 1 of 1
Adjusting a 3D Model's pitch in Zandronum?
Posted: Sun Apr 12, 2015 8:51 pm
by Kaminsky
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:]

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

This is in Zandronum 2.0.
[/spoiler]
So can a 3D model's inherit an actor's pitch in Zandronum?
RE: Adjusting a 3D Model's pitch in Zandronum?
Posted: Mon Apr 13, 2015 12:46 am
by Ænima
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.
RE: Adjusting a 3D Model's pitch in Zandronum?
Posted: Mon Apr 13, 2015 1:30 am
by Kaminsky
Æ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.
RE: Adjusting a 3D Model's pitch in Zandronum?
Posted: Mon Apr 13, 2015 1:55 am
by Ænima
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.
RE: Adjusting a 3D Model's pitch in Zandronum?
Posted: Mon Apr 13, 2015 2:27 am
by PREPPER
I just edit the model using 3ds or milkshape, if its md2 or md3 format.
RE: Adjusting a 3D Model's pitch in Zandronum?
Posted: Mon Apr 13, 2015 2:59 am
by Kaminsky
Æ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.
RE: Adjusting a 3D Model's pitch in Zandronum?
Posted: Mon Apr 13, 2015 8:41 am
by Dark-Assassin
INHERITACTORPITCH and INHERITACTORROLL are features that are not in Zandronum's modeling system.
Related Backport Ticket:
http://zandronum.com/tracker/view.php?id=519