Hi everyone!
There is a way to change the Player.ViewBob?
Something like this:
SetActorProperty(0, APROP_ViewBob, 0.1)
I mean, i can change Player.Viewheight with SetActorProperty(0, APROP_ViewHeight...
What about "APROP_ViewBob" for Player.ViewBob ?
ViewBob
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!)
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!)
- Player701
-
- Posts: 1640
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
- Contact:
Re: ViewBob
It can be accessed directly via ZScript, but not in ACS.
For example, this inventory item will change the player's ViewBob to 0.1 upon pickup (note that ViewBob is defined for PlayerPawn so you have to cast toucher to PlayerPawn first):
If you need to do this from ACS, see ScriptCall.
For example, this inventory item will change the player's ViewBob to 0.1 upon pickup (note that ViewBob is defined for PlayerPawn so you have to cast toucher to PlayerPawn first):
Code: Select all
class TestInv : Inventory
{
override bool TryPickup(in out Actor toucher)
{
let pp = PlayerPawn(toucher);
if (pp != null)
{
pp.ViewBob = 0.1;
}
GoAwayAndDie();
return true;
}
}
Re: ViewBob
Zscript?
Thanks for the tip
Thanks for the tip