mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Added angular size limit to hydras too.
This commit is contained in:
parent
641b9e8253
commit
676141024a
1 changed files with 3 additions and 2 deletions
|
@ -278,8 +278,9 @@ function controller(wichSide) {
|
|||
var X = Vec3.sum(A, Vec3.multiply(B, x));
|
||||
var d = Vec3.length(Vec3.subtract(P, X));
|
||||
|
||||
if (0 < x && x < LASER_LENGTH_FACTOR) {
|
||||
if (2 * Math.atan(properties.radius / Vec3.distance(Camera.getPosition(), properties.position)) * 180 / 3.14 > MAX_ANGULAR_SIZE) {
|
||||
var angularSize = 2 * Math.atan(properties.radius / Vec3.distance(Camera.getPosition(), properties.position)) * 180 / 3.14;
|
||||
if (0 < x && angularSize > MIN_ANGULAR_SIZE) {
|
||||
if (angularSize > MAX_ANGULAR_SIZE) {
|
||||
print("Angular size too big: " + 2 * Math.atan(properties.radius / Vec3.distance(Camera.getPosition(), properties.position)) * 180 / 3.14);
|
||||
return { valid: false };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue