mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-26 01:34:40 +00:00
ref #110 Fix recalculate positon.
This commit is contained in:
parent
6dbb7debaf
commit
9465c0358b
@ -23,19 +23,13 @@ void GroupObject::render(unsigned int tbfMsec) {
|
||||
|
||||
if (Localpropertys *props = getLocalpropertys(object->guiId())) {
|
||||
|
||||
if (!props->_rotation.isNull()) {
|
||||
if (!props->_rotation.isNull())
|
||||
object->setRotation(_this->rotation() * props->_rotation);
|
||||
|
||||
QVector3D reCalcVectorPs = reCalcPos(props->_position,
|
||||
_this->rotation().toEulerAngles());
|
||||
|
||||
object->setposition(_this->position() + reCalcVectorPs);
|
||||
|
||||
} else {
|
||||
object->setposition(_this->position() + props->_position);
|
||||
}
|
||||
|
||||
QVector3D reCalcVectorPs = reCalcPos(props->_position,
|
||||
_this->rotation().toEulerAngles());
|
||||
|
||||
object->setposition(_this->position() + reCalcVectorPs);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user