scaling formula - widget?
What I have in mind is a set of variable parameters that will scale an object - mostly I am thinking front to back.
Variables: Ybottom, Ytop, InitialScale, FinalScale, other?
As the object moves from Ybottom to Ytop it is scaled - on a percentage or ratio basis? - down. Or up for that matter but I am thinking of a perspective situation so as the object/player moves 'away', into the room it is scaled down relative to the proportion of the room.
I have had the thought for some time but never made a start. Before I do i thought I would check and see if such a thing already exists is some form.
Re: scaling formula - widget?
You can set the scale to Distance/x, where x is the dampening you want. EG, if it is 10 pixels away but you want it scale 1.0 at 10 pixels, x would be 10.0 (with the .0). The Distance can be X-only distance, Y-only distance, or standard XY-distance. ;)
Re: scaling formula - widget?
Thanks LB - I will try that later.
Just a general thumbs up on your overall offerings here. I have picked up a lot through your replies. Consistent and clear. Thx.
Re: scaling formula - widget?
No luck. This is what I ended up with after various convoluted attempts to find a ratio. The drawing hopefully locates things. "zx" is the object used to store values.
http://www.buddhamind.info/mmf/AK_scale.png
(BOT_SCALE( "zx" )-(BOT_SCALE( "zx" )-TOP_SCALE( "zx" )))/((Y( "zx" )-TOP_Y( "zx" ))/(BOT_Y( "zx" )-Y( "zx" )))
It does some scaling but nothing like what I have in mind.
Re: scaling formula - widget?
I don't know if this is what you are asking for:
http://games4noah.sitesled.com/knp/3DBALL3.exe
(Press the spacebar for a 'behind the scenes' view.)
...
Set scale to Y("Active")*0.01
The front and back walls of the room are set the same way. Then I built the collision stuff around that.
Re: scaling formula - widget?
mojofltr - hey that's pretty cool. Certainly the scaling effect is what I am looking for.
I am very interested in studying the mfa if you were OK about that.
Re: scaling formula - widget?
http://mfa.aquadasoft.com/upload/1313015217-3DBALL2_c.mfa
I didn't comment it very well, but honestly there is not much to it... so it should be fairly easy to figure out what's going on. :)
Re: scaling formula - widget?
Many thanks for that. With just a quick look through it seems clear enough
>> I didn't comment it very well
I would like to see your well commented files then. This was about as good as I ever get. Grreat.
I'll let you know how I get on.