Sponsored Links

Sponsored Links

Results 1 to 1 of 1



  1. #1
    Registered User pragmadev's Avatar
    Join Date
    Aug 2010
    Posts
    4
    Sponsored Links

    [UnAnswered] PS3 Development / Math operations help

    Sponsored Links
    Hey folks, I'm running into a bit of a snag with a test application I'm building

    I saw that you could get the float value of the analogue sticks by calling getFloatValue, so I assumed it would be safe to make float definitions for both x and y of the left analogue stick.

    Now, I wish I could attach a debugger, since I don't know whether the float statements aren't correct -- or if I can't do type casting with using the classic (int)float method. Do I have to FTOA and then ATOI?

    This usually freezes the console

    Any ideas from some knowledgable gurus around here? I'm just trying to learn my way around this console =S

    Code:
    	
    float xfloat = mpLeftX->getFloatValue();
    float yfloat = mpLeftY->getFloatValue();
    
    int xnum = (int)xfloat;
    int ynum = (int)yfloat;
    
    ---
    
    FWDebugFont::printf("Left X\n", xnum);
    FWDebugFont::printf("Left Y\n", ynum);
    I managed to fix it, turns out my controller mapping was slightly erroneous.
    Last edited by pragmadev; 09-21-2010 at 12:27 AM Reason: Automerged Doublepost

 

Sponsored Links

Affiliates - Contact Us - PS3 Downloads - Privacy Statement - Site Rules - Top - © 2014 PlayStation 3 News