mirror of
https://github.com/lubosz/overte.git
synced 2025-08-16 12:52:39 +02:00
Use 'orientation' for Collision Pick API, not 'rotation'
This commit is contained in:
parent
f902552309
commit
e5e1a72598
2 changed files with 5 additions and 5 deletions
|
@ -255,7 +255,7 @@ unsigned int PickScriptingInterface::createParabolaPick(const QVariant& properti
|
||||||
* @typedef {object} Picks.CollisionPickProperties
|
* @typedef {object} Picks.CollisionPickProperties
|
||||||
* @property {Shape} shape - The information about the collision region's size and shape.
|
* @property {Shape} shape - The information about the collision region's size and shape.
|
||||||
* @property {Vec3} position - The position of the collision region.
|
* @property {Vec3} position - The position of the collision region.
|
||||||
* @property {Quat} rotation - The orientation of the collision region.
|
* @property {Quat} orientation - The orientation of the collision region.
|
||||||
*/
|
*/
|
||||||
unsigned int PickScriptingInterface::createCollisionPick(const QVariant& properties) {
|
unsigned int PickScriptingInterface::createCollisionPick(const QVariant& properties) {
|
||||||
QVariantMap propMap = properties.toMap();
|
QVariantMap propMap = properties.toMap();
|
||||||
|
|
|
@ -259,7 +259,7 @@ public:
|
||||||
* @typedef {object} CollisionPick
|
* @typedef {object} CollisionPick
|
||||||
* @property {Shape} shape - The information about the collision region's size and shape.
|
* @property {Shape} shape - The information about the collision region's size and shape.
|
||||||
* @property {Vec3} position - The position of the collision region.
|
* @property {Vec3} position - The position of the collision region.
|
||||||
* @property {Quat} rotation - The orientation of the collision region.
|
* @property {Quat} orientation - The orientation of the collision region.
|
||||||
*/
|
*/
|
||||||
class CollisionRegion : public MathPick {
|
class CollisionRegion : public MathPick {
|
||||||
public:
|
public:
|
||||||
|
@ -290,8 +290,8 @@ public:
|
||||||
if (pickVariant["position"].isValid()) {
|
if (pickVariant["position"].isValid()) {
|
||||||
transform.setTranslation(vec3FromVariant(pickVariant["position"]));
|
transform.setTranslation(vec3FromVariant(pickVariant["position"]));
|
||||||
}
|
}
|
||||||
if (pickVariant["rotation"].isValid()) {
|
if (pickVariant["orientation"].isValid()) {
|
||||||
transform.setRotation(quatFromVariant(pickVariant["rotation"]));
|
transform.setRotation(quatFromVariant(pickVariant["orientation"]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ public:
|
||||||
collisionRegion["shape"] = shape;
|
collisionRegion["shape"] = shape;
|
||||||
|
|
||||||
collisionRegion["position"] = vec3toVariant(transform.getTranslation());
|
collisionRegion["position"] = vec3toVariant(transform.getTranslation());
|
||||||
collisionRegion["rotation"] = quatToVariant(transform.getRotation());
|
collisionRegion["orientation"] = quatToVariant(transform.getRotation());
|
||||||
|
|
||||||
return collisionRegion;
|
return collisionRegion;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue