Orbit Camera

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Nash
 
 
Posts: 17357
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Orbit Camera

Post by Nash »



A simple mod I made for people who'd like to capture a rotating view of their models for social media purposes. Bind the button in the controls menu, point to an actor with your crosshair and press the button. The world will be frozen, and the camera will rotate around the actor.

Press the same key again to exit the orbiting mode.

While the camera is in orbit, you can press Page Up/Page Down to change the camera's elevation, or Home/End to change the camera's pitch. These keys are currently hardcoded, sorry!

Notes:

1) for dying monsters, you might have to point your crosshair to their feet, because actors' hitboxes in Doom are hardcoded to be really short when they die.
2) very, very short objects (like some of the blood pools in Doom) might not be capturable. I'm not sure how to fix this

License: Unlicensed (do whatever you want)
You do not have the required permissions to view the files attached to this post.
User avatar
Nash
 
 
Posts: 17357
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Orbit Camera

Post by Nash »

Update: added camera elevation and pitch controls.
User avatar
Sir Robin
Posts: 400
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Orbit Camera

Post by Sir Robin »

Nice! I've been playing with this for a bit. I was writing an automatic pitch adjuster, to always face the target, but then found out it's built-in to the A_Face function.
Just call A_FaceTarget like this:
A_FaceTarget(0,0);
and then it's handled automatically.

Any idea how to stop the camera from bumping up and down when it hits stairs or the ceiling? Like to turn off the automatic Z adjustment
User avatar
Nash
 
 
Posts: 17357
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Orbit Camera

Post by Nash »

Sir Robin wrote: Any idea how to stop the camera from bumping up and down when it hits stairs or the ceiling? Like to turn off the automatic Z adjustment
This seems to be hard-coded behavior, the camera cannot go above the ceiling or below the floor.

Return to “Script Library”