mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 02:37:02 +02:00
Add support for rotation as CollisionRegion parameter and make it the default
This commit is contained in:
parent
22142a84b8
commit
5b6916177c
2 changed files with 4 additions and 2 deletions
|
@ -255,7 +255,7 @@ unsigned int PickScriptingInterface::createParabolaPick(const QVariant& properti
|
|||
* @typedef {object} Picks.CollisionPickProperties
|
||||
* @property {Shape} shape - The information about the collision region's size and shape.
|
||||
* @property {Vec3} position - The position of the collision region.
|
||||
* @property {Quat} orientation - The orientation of the collision region.
|
||||
* @property {Quat} rotation - The orientation of the collision region.
|
||||
*/
|
||||
unsigned int PickScriptingInterface::createCollisionPick(const QVariant& properties) {
|
||||
QVariantMap propMap = properties.toMap();
|
||||
|
|
|
@ -282,7 +282,9 @@ public:
|
|||
if (pickVariant["position"].isValid()) {
|
||||
transform.setTranslation(vec3FromVariant(pickVariant["position"]));
|
||||
}
|
||||
if (pickVariant["orientation"].isValid()) {
|
||||
if (pickVariant["rotation"].isValid()) {
|
||||
transform.setRotation(quatFromVariant(pickVariant["rotation"]));
|
||||
} else if (pickVariant["orientation"].isValid()) {
|
||||
transform.setRotation(quatFromVariant(pickVariant["orientation"]));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue