Problem with Scaling?

Blitz3D Forums/Blitz3D Programming/Problem with Scaling?

Guy Fawkes(Posted 2013) [#1]
Hi all. I'm still working on my program, and I have gotten to the point where I need to scale my objects.

Problem is, I cannot control the speed of the resizing of the objects for some reason & would like to know how to fix this example code I created:

ScaleObjectsTest.bb:



Thank You kindly!


Guy Fawkes(Posted 2013) [#2]
Can someone please help?

Thank You and Merry Christmas!


John Blackledge(Posted 2013) [#3]
Should you be using ScaleMesh instead?
According to the docs there_is_ a difference.


Guy Fawkes(Posted 2013) [#4]
No, I tried that. Unfortunately, it made things worse.

Anyway, I have it almost working now. What I need is for it instead of resetting the size of the objects and THEN scaling, I need each object to stay at its' exact size and THEN allow for scaling.

ScaleObjectsTest.bb:



Thank You & Merry Christmas!


Guy Fawkes(Posted 2013) [#5]
Arg. I still can't get it to work. :(


Guy Fawkes(Posted 2013) [#6]
A small fix, but still having the same above problem:




Floyd(Posted 2013) [#7]
The original "size" is, by definition, 1. Increasing that by 1% would give sizes of 1.01, 1.02 etc.



If you want to scale relative to current size, rather than original, then do size=size*1.01 to increase 1%. Use size=size/1.01 to undo that increase.


Floyd(Posted 2013) [#8]
Also that camera range near/far ratio is about ten thousand times too big. If that's because of the giant skybox then it is not needed. The usual technique is to make the skybox small, with size of perhaps 10 instead of 1000000. Use EntityOrder to force it to be drawn first. Then on screen it will go behind everything else no matter how big or small it actually is.


Guy Fawkes(Posted 2013) [#9]
THANK you SO MUCH, Floyd! You've just saved my project! :D Also, I will remember to take into account, a smaller sky. Thank You again, kind sir! MERRY CHRISTMAS!

For those of you who want to control the sphere with a key, the code is here and it's easier than I thought it would be!

ScaleTest.bb:



MERRY CHRISTMAS, ALL! :D