Player predicted angles
- Hymns For Disco
- Member
- Posts: 32
- Joined: Wed Nov 22, 2017 7:18 am
- Contact:
Player predicted angles
In sourcemod, the OnPlayerRunCmd forward gives access to get/set the player's predicted view angles. I would like to be able to get/set these angles in my sourcepython plugin, but I'm not sure how to do this. Ideally I would like to be able to get/set at directly from the Player reference and not need to do it in the @OnPlayerRunCommand listener
Re: Player predicted angles
In a OnPlayerRunCommand listener you can modify the UserCmd instance:
http://wiki.sourcepython.com/developing ... iew_angles
If you would like to modify the angles outside of the OnPlayerRunCommand listener, you can use this:
http://wiki.sourcepython.com/developing ... view_angle
http://wiki.sourcepython.com/developing ... iew_angles
If you would like to modify the angles outside of the OnPlayerRunCommand listener, you can use this:
http://wiki.sourcepython.com/developing ... view_angle
- Hymns For Disco
- Member
- Posts: 32
- Joined: Wed Nov 22, 2017 7:18 am
- Contact:
Re: Player predicted angles
Thank you for the reply. the documentation is a bit unclear about if the angles are the 'predicted' angles or not. It's important for my purposes to be able to set the predicted angles. My plugin will be repeatedly loading this data for a replay feature. Since the viewing client does not get updated about the angles *every* frame, it looks quite choppy without the predicted angles also being set. I believe setting the Player.view_angles is setting the actual view angles, and not the predicted value. I will try changed the UserCmd.view_angles
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 85 guests