???Swinging Dynamic Light???

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.
Moebius
Posts: 53
Joined: Thu Jan 28, 2021 1:45 am

???Swinging Dynamic Light???

Post by Moebius »

Any way to make a dynamic light swing like a pendulum?

I have a 3D model light that hangs from the ceiling. I can make it oscillate and would like the light from it move as it moves.

My general impression from what I've tried is it can't be done.
User avatar
difficultoldstuff
Posts: 35
Joined: Fri Jul 17, 2020 5:38 am
Operating System Version (Optional): Windows 7
Graphics Processor: nVidia with Vulkan support

Re: ???Swinging Dynamic Light???

Post by difficultoldstuff »

Oh, is it a spot / cone light (DYNAMICLIGHT.LF_SPOT flag for A_AttachLight)? If so, assigning it to an object that is changing the pitch / angle values in a "pendulum way" and calling A_AttachLight with the updated pitch value each tick should do the trick.

Return to “Mapping”