Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pivot point incorrect on scaled mesh (quick fix) #650

Closed
Okamoi opened this issue Oct 10, 2013 · 1 comment
Closed

Pivot point incorrect on scaled mesh (quick fix) #650

Okamoi opened this issue Oct 10, 2013 · 1 comment
Assignees
Labels

Comments

@Okamoi
Copy link

Okamoi commented Oct 10, 2013

There seems to be a bug in transform order when you modify the pivot point of a scaled mesh.

Easily reproducible in AwayBuilder with the following steps:

  • Create a geometry
  • Create a mesh with that geometry
  • Scale that mesh to anything except 1
  • Move the mesh pivot as you please

You’ll notice that when you move the pivot on an axis where scale != 1, both the pivot AND the graphics move.

Changing line 902 of Object3D with the following is a possible fix:

_transform.prependTranslation(-_pivotPoint.x/_sca.x, -_pivotPoint.y/_sca.y, -_pivotPoint.z/_sca.z);

When you get around to fixing this bug, could you please also rebuild AwayBuilder with the corrected Away3D so everyone benefits from this fix ? Thanks.

@ghost ghost assigned gonchar Dec 26, 2013
gonchar pushed a commit that referenced this issue Jan 2, 2014
@gonchar
Copy link
Member

gonchar commented Jan 2, 2014

Yep, you are right! The right order is scale * pivot point * rotation * object translation
thank you for the issue!

@gonchar gonchar closed this as completed Jan 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants