Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Rejected Implement Camera #getAngleDifference

Joined
Dec 31, 2015
Messages
602
It would be nice to know BEFORE turning the camera, what the difference in pitch & yaw would be to the object.
This could stop lots of really silly camera calls, I know a lot of people use Object Visibility, and as a matter of fact sometimes the visibility isn't as high as you would expect it to be thus you end up spam calling to turn to it.

By having this method (Which authors technically could implement themselves however it seems to fit rather nicely into the Camera class) it would stop really miniscule camera changes and wasted calls/threads to turn the camera.

Alternatively getPitch() and getYaw() could have an additional paramater allowed that would return the pitch and yaw the camera is required to turn to for that object, so you can do the analysis of data yourself.

Just a thought that popped in my head while showering.
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
We have CameraCalculations.cameraAngleTo() in our API that return the camera angle difference towards a locatable ;)
 
Joined
Dec 31, 2015
Messages
602
Please tell me you didnt just copy our implementation. It's terrible, I wrote it years ago and never bothered optimizing it.
He said they already had it, but it was just not exposed.
 
Client Developer
Joined
Oct 12, 2015
Messages
3,764
This is already implemented in CommonMath#getAngleOf(Locatable, Locatable) and #getAngleOf(Locatable)
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
This is already implemented in CommonMath#getAngleOf(Locatable, Locatable) and #getAngleOf(Locatable)
Those aren't accounting for camera angle though, just for the angle between the two locatables. (correct me if i'm wrong, but i am pretty sure thats how it is)
 
Top