Code/Editor
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -44,14 +44,14 @@ bool SubObjectSelectionReferenceFrameCalculator::GetFrame(Matrix34& refFrame)
|
||||
|
||||
if (this->nNormals > 0)
|
||||
{
|
||||
this->normal = this->normal / this->nNormals;
|
||||
this->normal = this->normal / static_cast<float>(this->nNormals);
|
||||
if (!this->normal.IsZero())
|
||||
{
|
||||
this->normal.Normalize();
|
||||
}
|
||||
|
||||
// Average position.
|
||||
this->pos = this->pos / this->nNormals;
|
||||
this->pos = this->pos / static_cast<float>(this->nNormals);
|
||||
refFrame.SetTranslation(this->pos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user