How do I roll models so they don't revert back? (SOLVED)

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
Darkcrafter
Posts: 562
Joined: Sat Sep 23, 2017 8:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

How do I roll models so they don't revert back? (SOLVED)

Post by Darkcrafter »

As soon as I assign the new "Roll" value (315) to my model of a rock it rotates just as I'd like it to but as soon as I close the properties window it reverts back to its default state while still preserving the parameter value at 315. What am I doing wrong?

Here are my actor definitions:

actor StoneSP_ROCK1_3D_NC 11066
{
Height 32
Radius 32
+NOCLIP
+NOGRAVITY
+ROLLSPRITE
+ROLLCENTER
States
{
Spawn:
SP1R A -1

Loop
}
}

Model StoneSP_ROCK1_3D_NC
{
Path "Models\Stones\Rockery"
SKIN 0 "StoneSP_ROCK1_3D.jpg"
MODEL 0 "StoneSP_ROCK1.md3"
Scale 1.0 1.0 1.0
zoffset 0
FrameIndex SP1R A 0 0
}
Attachments
Step1.jpg
Step2.jpg
User avatar
Darkcrafter
Posts: 562
Joined: Sat Sep 23, 2017 8:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: How do I roll models so they don't revert back? (SOLVED)

Post by Darkcrafter »

The solution was fairly easy to implement! One just need to add flag "USEACTORROLL" to modeldef of the target 3d model, so an example model should look like:

Model StoneSP_ROCK1_3D
{
Path "Models\Stones\Rockery"
SKIN 0 "StoneSP_ROCK1_3D.jpg"
MODEL 0 "StoneSP_ROCK1.md3"
USEACTORROLL
Scale 1.0 1.0 1.0
zoffset 0
FrameIndex SP1R A 0 0
}

The same thing applies to pitch:

Model StoneSP_ROCK1_3D
{
Path "Models\Stones\Rockery"
SKIN 0 "StoneSP_ROCK1_3D.jpg"
MODEL 0 "StoneSP_ROCK1.md3"
USEACTORPITCH
Scale 1.0 1.0 1.0
zoffset 0
FrameIndex SP1R A 0 0
}

Or even both at the same time!

Model StoneSP_ROCK1_3D
{
Path "Models\Stones\Rockery"
SKIN 0 "StoneSP_ROCK1_3D.jpg"
MODEL 0 "StoneSP_ROCK1.md3"
USEACTORROLL
USEACTORPITCH
Scale 1.0 1.0 1.0
zoffset 0
FrameIndex SP1R A 0 0
}

Easy pz :D
Post Reply

Return to “Mapping”