Retrieve camera change of angle/pitch
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!)
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
Retrieve camera change of angle/pitch
How, and can I, detect how much player camera change it angle and/or pitch from previous position?
-
- Admin
- Posts: 6190
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
Re: Retrieve camera change of angle/pitch
Simple example you can put in your player class, just to see how it works.
Same can be done for pitch.
Code: Select all
double oldAngle;
override void Tick() {
super.Tick();
double angleChange = DeltaAngle(angle, oldAngle);
console.printf("%f", angleChange);
oldAngle = angle;
}
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
Re: Retrieve camera change of angle/pitch
Argh...
I dont mention that this is for UI render overlay event.
Download this, run and summon spectre.
viewtopic.php?p=1061257#p1061257
Problem is that if you try to furiously move mouse from side to side with spectre on screen, "shader frame"...mmmmm glitch a little. And I dont know how fix it.
I dont mention that this is for UI render overlay event.
Download this, run and summon spectre.
viewtopic.php?p=1061257#p1061257
Problem is that if you try to furiously move mouse from side to side with spectre on screen, "shader frame"...mmmmm glitch a little. And I dont know how fix it.