when an object gets closer, (in a 3D game) the closer it gets the faster it's size grows?
Offline
You could have the size increase inversely proportional to the "distance" to the object - for example [Change size by 1/distance]. This probably would make the increase too fast, but you should be able to get a good value if you work with it a bit, maybe changing the value to 2 or something along those lines.
Offline
Harakou wrote:
You could have the size increase inversely proportional to the "distance" to the object - for example [Change size by 1/distance]. This probably would make the increase too fast, but you should be able to get a good value if you work with it a bit, maybe changing the value to 2 or something along those lines.
I can't really get it to work. Could you please have a go?
Offline
calebxy wrote:
Harakou wrote:
You could have the size increase inversely proportional to the "distance" to the object - for example [Change size by 1/distance]. This probably would make the increase too fast, but you should be able to get a good value if you work with it a bit, maybe changing the value to 2 or something along those lines.
I can't really get it to work. Could you please have a go?
I don't really know what you're using to determine distance, but let me make an example for you. This script starts with the the distance to 10 units and the size at 100%, and then adjusts the size inversely to the distance.
Last edited by Harakou (2011-06-14 11:38:55)
Offline
Harakou wrote:
calebxy wrote:
Harakou wrote:
You could have the size increase inversely proportional to the "distance" to the object - for example [Change size by 1/distance]. This probably would make the increase too fast, but you should be able to get a good value if you work with it a bit, maybe changing the value to 2 or something along those lines.
I can't really get it to work. Could you please have a go?
I don't really know what you're using to determine distance, but let me make an example for you. This script starts with the the distance to 10 units and the size at 100%, and then adjusts the size inversely to the distance.
http://i.imgur.com/TNWKn.gif
It won't let me press down.
Edit: Never mind.
Last edited by calebxy (2011-06-14 12:39:01)
Offline
Harakou wrote:
calebxy wrote:
Harakou wrote:
You could have the size increase inversely proportional to the "distance" to the object - for example [Change size by 1/distance]. This probably would make the increase too fast, but you should be able to get a good value if you work with it a bit, maybe changing the value to 2 or something along those lines.
I can't really get it to work. Could you please have a go?
I don't really know what you're using to determine distance, but let me make an example for you. This script starts with the the distance to 10 units and the size at 100%, and then adjusts the size inversely to the distance.
http://i.imgur.com/TNWKn.gif
Thank you very much. That works!
Offline
Sorry to be a bother, (and I probably sound really stupid saying this) but how do I do that same thing with the Y position?
Offline
Harakou wrote:
What do you mean with the y position?
Well, in a 3D game, the object would get bigger, and move down the screen, both of which have the same problem.
Offline
calebxy wrote:
Harakou wrote:
What do you mean with the y position?
Well, in a 3D game, the object would get bigger, and move down the screen, both of which have the same problem.
Oh. Well I suppose it would be relatively easy to do a similar thing with y position; just multiply the expression by -1 and adjust it a bit so that the values for y would match correctly. (It would probably be something like (-1000/distance) + 100.)
Offline
Harakou wrote:
calebxy wrote:
Harakou wrote:
What do you mean with the y position?
Well, in a 3D game, the object would get bigger, and move down the screen, both of which have the same problem.
Oh. Well I suppose it would be relatively easy to do a similar thing with y position; just multiply the expression by -1 and adjust it a bit so that the values for y would match correctly. (It would probably be something like (-1000/distance) + 100.)
Thanks you, that works brilliantly.
Offline
calebxy wrote:
Harakou wrote:
calebxy wrote:
Well, in a 3D game, the object would get bigger, and move down the screen, both of which have the same problem.Oh. Well I suppose it would be relatively easy to do a similar thing with y position; just multiply the expression by -1 and adjust it a bit so that the values for y would match correctly. (It would probably be something like (-1000/distance) + 100.)
Thanks you, that works brilliantly.
![]()
No problem.
Offline
Aslo, maybe you should wait until Scratch3D comes out to have no problems with making 3D games and it looks more realistic.
Last edited by peterkap (2011-06-14 13:48:17)
Offline