mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 07:23:39 +02:00
fixes per code review
This commit is contained in:
parent
61f4009b22
commit
aab93d8a26
1 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
//
|
//
|
||||||
// golfClub.js
|
// golfClub.js
|
||||||
//
|
//
|
||||||
// Created by Philip Rosedale on 11/11/15.
|
// Created by Philip Rosedale on April 11, 2016.
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -46,7 +46,7 @@ function triggerPulled(hand) {
|
||||||
|
|
||||||
function ballPosition(ball) {
|
function ballPosition(ball) {
|
||||||
// return the position of this entity
|
// return the position of this entity
|
||||||
var properties = Entities.getEntityProperties(ball);
|
var properties = Entities.getEntityProperties(ball, ['position']);
|
||||||
if (!properties) {
|
if (!properties) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
|
@ -82,7 +82,7 @@ function avatarHalfHeight() {
|
||||||
|
|
||||||
function brakeBall(ball) {
|
function brakeBall(ball) {
|
||||||
// Check the ball's velocity and slow it down if beyond a threshold
|
// Check the ball's velocity and slow it down if beyond a threshold
|
||||||
var properties = Entities.getEntityProperties(ball);
|
var properties = Entities.getEntityProperties(ball, ['velocity']);
|
||||||
if (properties) {
|
if (properties) {
|
||||||
var velocity = Vec3.length(properties.velocity);
|
var velocity = Vec3.length(properties.velocity);
|
||||||
if ((velocity > 0) && (velocity < MAX_BRAKING_SPEED)) {
|
if ((velocity > 0) && (velocity < MAX_BRAKING_SPEED)) {
|
||||||
|
|
Loading…
Reference in a new issue