greeting , i wanna make zoom upon the 3d model when i click upon the flash button(UP, DOWN) and translate when i click upon the flash button(RIGHT, LEFT) thank you :)
Go for it. The amount to scale is controlled by the zoom variable. If you limit the range of values that variable can take, you also limit the amount of scaling that happens. You can limit it by checking to see if it more or less than certain values, and then setting it to a valid value if it is.
This is often not taught in programming classes, but if you want your program to do something different, you have to change the code so that the code is different.
Uh. Huh. I'm confused why you reload each model every time a key is pressed. Couldn't you just have an array of models, and pick which one you want to draw by using an index into that array?
Also, the code you've posted doesn't help illustrate the problems you're having. Can you cut it down to an small section of code that shows the trouble you're having without using things like object models and webcam libraries? Hopefully something I can copy, paste, and run.
**thank you ==>TfGuy44 i did it ** and this is the code code where i need to make a limite for the zoom , i meen when i zoom back.. the zoom stoped when the value of scaler=20, for exemle i don't need to do the zoom back until i can't see the model and the same think for the forward zoom.. and thank you another time :)
@TFGuy44 ==> thank you brother i did it :) but another think very important if you can ,can you give me some help i wanna translate my code to android please ?
Answers
can i her make a limite upon the zoom because i have problem there ? :/
Go for it. The amount to scale is controlled by the zoom variable. If you limit the range of values that variable can take, you also limit the amount of scaling that happens. You can limit it by checking to see if it more or less than certain values, and then setting it to a valid value if it is.
This is often not taught in programming classes, but if you want your program to do something different, you have to change the code so that the code is different.
Post your attempt at it for more help.
the code
Uh. Huh. I'm confused why you reload each model every time a key is pressed. Couldn't you just have an array of models, and pick which one you want to draw by using an index into that array?
Also, the code you've posted doesn't help illustrate the problems you're having. Can you cut it down to an small section of code that shows the trouble you're having without using things like object models and webcam libraries? Hopefully something I can copy, paste, and run.
i like when you say "array of models" and "using an index into that array" can you help me there please it's very important for me :)
**thank you ==>TfGuy44 i did it ** and this is the code code where i need to make a limite for the zoom , i meen when i zoom back.. the zoom stoped when the value of scaler=20, for exemle i don't need to do the zoom back until i can't see the model and the same think for the forward zoom.. and thank you another time :)
the code
Example for limiting variables' values:
@TFGuy44 ==> thank you brother i did it :) but another think very important if you can ,can you give me some help i wanna translate my code to android please ?
Nope. I don't help feature creepers. Plus I have no experience making things work on Android. Do/try it yourself!