Search Results

Search found 3 results on 1 pages for 'makenshi'.

Page 1/1 | 1 

  • Free Fall Question

    - by Makenshi
    ok im gonna try my best to explain my problem i have this program where u can select 5 balls when u select one you can take it with you while you have the mouse button pressed and its within the ball radius. The problem is that i need a way to make the ball go up when the user stop pressing the mouse button like he sent it to float in the air then make it fall down again i have one way to know the time,velocity and thus the acceleration but i dont know how to implement it... right now i have this void Circulo::caida(float velocidad,float tiempo) { if(this->posY >= 580) { this->posY = 580; this->vcaida = 0.0f; } else if(this->posY < 580) { //this->distancia=9.81f * 0.5f*tiempo*tiempo; this->vcaida += velocidad; this->posY += this->vcaida; } } with this like this it just falls and i cant make the effect i tried to explain... thank you i hope someone can help me .< oh yeah im calculating the time like this just in case it helps difX=(x> evento.motion.xrel)? x-evento.motion.xrel : evento.motion.xrel-x; difY=(y> evento.motion.yrel)? y-evento.motion.yrel : evento.motion.yrel-y; and im sending difY as the time variable

    Read the article

  • Casting problem cant convert from void to float C++

    - by Makenshi
    as i said i get this horrible error i dont really know what to do anymore float n= xAxis[i].Normalize(); thats where i get the error and i get it cuz normalize is a void function this is it void CVector::normalize() { float len=Magnitude(); this->x /= len; this->y /= len; } i need normalize to stay as void tho i tried normal casting like this float n= (float)xAxis[i].Normalize(); and it doesnt work also with static,dynamic cast,reinterpret,const cast and cant make it work any help would be really apreciated... thank you .<

    Read the article

  • missing subscript c++

    - by Makenshi
    right now c++ is giving me this error: error C2087 'color' missing subscript first time i get this and i dont know what to do .< hope any1 can help me struct Color{ float r; float g; float b; };Color color[][]; and im using it here for(int i=0;i<cubes;i++) { color[i][0].r = fRand();color[i][0].g=fRand(.5);color[i][0].b=fRand(); ...etc

    Read the article

1