8000 bug-fix: ofxFlashMatrix set_y_scale had the sin positive. by jesusgollonet · Pull Request #4 · julapy/ofxFlashLite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bug-fix: ofxFlashMatrix set_y_scale had the sin positive. #4

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

bug-fix: ofxFlashMatrix set_y_scale had the sin positive. #4

wants to merge 1 commit into from

Conversation

jesusgollonet
Copy link

problem: rotating a sprite while altering its height gave weird transformation problems. width was fine

to test

.h
ofxFlashSprite * sprite1;
...
.cpp
void testApp::setup() {
    sprite1 = new ofxFlashSprite();
    ofxFlashShape * s = new ofxFlashShape();
    s->setRectangle(-50, -50, 100, 100);
    s->setFill(true);
    sprite1->addChild(s);
    stage->addChild(sprite1);
}
....
void testApp::update(){

    // sprite1->width(100+ ofGetFrameNum() *.001f);     // this works fine
    sprite1->height(100+ ofGetFrameNum() *.001f); // this gives a weird transformation on the rotation
    sprite1->rotation(ofGetFrameNum()*.01f);
}

with the fix we get the expected result, a box that is growing vertically and rotates at the same time

the problem was that in set_y_scale, setC wasn't using the sin as negative.

…ght and rotating at the same time gave weird transformation problems
@julapy
Copy link
Owner
julapy commented May 3, 2012

nice find.
when i have a spare minutes i'll test this with the existing examples just to make sure it doesn't alter any other behavior.

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.

2 participants
0