Setting an actor's camera height?

Ask about ACS, DECORATE, ZScript, or any other scripting questions 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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Setting an actor's camera height?

Post by TDRR »

So let's say i'm applying a camera to a monster, which then i apply to a camera texture. The problem is, the camera is placed on the actor's feet, which definitely doesn't work for a splitscreen match. I tried using Player.ViewHeight 41, but that only spits out a DECORATE error: "Unexpected 41 in definition of BotMarineShotgun"

Right now i am using monsters for testing, but if i were to place the camera on a PlayerPawn/Actual player, would it be at the correct height?

EDIT: Tested it on a player and a bot now, and it works perfectly fine! Whew, for a second i thought this would be impossible.
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: Setting an actor's camera height?

Post by Void Weaver »

IIUC, if you want to stick cam. to monster actor, then its CameraHeight property must be defined, since the Player.ViewHeight property work for players only. Then you should call a script which will retrieve actor's GetActorViewHeight and then will call ChangeCamera itself. I guess.
Post Reply

Return to “Scripting”