Merge pull request #16129 from RebeccaStankus/feetPosition

Feet position
This commit is contained in:
Zach Fox 2019-09-03 11:04:17 -07:00 committed by GitHub
commit d88c43614c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,6 +154,7 @@ class MyAvatar : public Avatar {
*
* @property {Vec3} qmlPosition - A synonym for <code>position</code> for use by QML.
*
* @property {Vec3} feetPosition - The position of the avatar's feet.
* @property {boolean} shouldRenderLocally=true - If <code>true</code> then your avatar is rendered for you in Interface,
* otherwise it is not rendered for you (but it is still rendered for other users).
* @property {Vec3} motorVelocity=Vec3.ZERO - The target velocity of your avatar to be achieved by a scripted motor.
@ -340,6 +341,7 @@ class MyAvatar : public Avatar {
Q_PROPERTY(QVector3D qmlPosition READ getQmlPosition)
QVector3D getQmlPosition() { auto p = getWorldPosition(); return QVector3D(p.x, p.y, p.z); }
Q_PROPERTY(glm::vec3 feetPosition READ getWorldFeetPosition WRITE goToFeetLocation)
Q_PROPERTY(bool shouldRenderLocally READ getShouldRenderLocally WRITE setShouldRenderLocally)
Q_PROPERTY(glm::vec3 motorVelocity READ getScriptedMotorVelocity WRITE setScriptedMotorVelocity)
Q_PROPERTY(float motorTimescale READ getScriptedMotorTimescale WRITE setScriptedMotorTimescale)
@ -1938,9 +1940,8 @@ public slots:
* @param {boolean} [shouldFaceLocation=false] - Set to <code>true</code> to position the avatar a short distance away from
* the new position and orientate the avatar to face the position.
*/
void goToFeetLocation(const glm::vec3& newPosition,
bool hasOrientation, const glm::quat& newOrientation,
bool shouldFaceLocation);
void goToFeetLocation(const glm::vec3& newPosition, bool hasOrientation = false,
const glm::quat& newOrientation = glm::quat(), bool shouldFaceLocation = false);
/**jsdoc
* Moves the avatar to a new position and/or orientation in the domain.