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

Updating axis on matrix change #3300

Merged
merged 3 commits into from Oct 11, 2014
Merged

Updating axis on matrix change #3300

merged 3 commits into from Oct 11, 2014

Conversation

ghost
Copy link

@ghost ghost commented Oct 11, 2014

getSideDir(), getLookAtDir() and getUpDir() return old vectors if you set a new matrix directly to a node.

@@ -143,6 +146,7 @@ void ofNode::setScale(float sx, float sy, float sz) {
void ofNode::setScale(const ofVec3f& s) {
this->scale = s;
createMatrix();
updateAxis();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createMatrix already calls updateAxis so it shooulnd't be necesary to call it here right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right! I fixed it

arturoc added a commit that referenced this pull request Oct 11, 2014
Updating axis on matrix change
@arturoc arturoc merged commit 4daba8b into openframeworks:master Oct 11, 2014
@arturoc
Copy link
Member

arturoc commented Oct 11, 2014

thanks!

@ghost
Copy link
Author

ghost commented Oct 12, 2014

You know what, I think updateAxis() is unnecessary for setPosition too. I didn't think yesterday that on position change orientation stays the same...

@ghost
Copy link
Author

ghost commented Oct 12, 2014

Can you quick fix it by removing this line?

@arturoc
Copy link
Member

arturoc commented Oct 12, 2014

you are right, setPosition won't change the axis, i'll remove that line

@kylemcdonald kylemcdonald mentioned this pull request Nov 1, 2015
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant