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.
???Swinging Dynamic Light???
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.
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.
-
- Posts: 38
- Joined: Fri Jul 17, 2020 5:38 am
- Operating System Version (Optional): Windows 7
- Graphics Processor: nVidia with Vulkan support
Re: ???Swinging Dynamic Light???
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.