Or, at the very least, some method to specify the origin of rotation as defined by an actor's pitch, angle, and roll (Don't recommend Rotation-Center, so far as I can tell that's for automatically rotating things in MODELDEF, not things rotating by their pitch, angle, and roll)
I'm running into a little issue with a player model in GZDoom. The player model is expected to roll at some points, but there's a frustrating side effect of this that in order for it to roll at the right point, it needs to have that rotation point put at the origin, which results in issues because now half the model is in the ground. This issue is made a little worse in that the player is also expected to fly at some points, so it makes it unclear where an enemy player needs to shoot. Setting Offset or ZOffset doesn't help, as the origin of rotation doesn't move with the offset, so while you've booted the bottom of the model out of the floor, now if you roll 180 degrees, the entirety of the model will have rolled into the ground.
My initial impulse was to mirror the model into another actor and have that match the main actor's motion with A_Warp but this didn't end up working as expected because the model is attached to a player, and suddenly you'll start seeing yourself if you do that.
MODELDEF flag to apply rotation after offset.
Moderator: GZDoom Developers
- InsanityBringer
- Posts: 3386
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: MODELDEF flag to apply rotation after offset.
It doesn't work like that. If you switch around matrix operations the end result will be totally off and needs even more compensation math elsewhere.
- InsanityBringer
- Posts: 3386
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: MODELDEF flag to apply rotation after offset.
How does an alternative proposal sound then: A flag that lets you use Rotation-Center to set the origin for normal Pitch/Angle/Roll rotations? I have this implemented and working and I'm not seeing any real problems with it.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49066
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: MODELDEF flag to apply rotation after offset.
If you have something working, feel free to make a submission.