|
I want to have a platform that begins to scale to (about) 0 in width and length once the player walks on top of it, but I want the player to have enough time to walk past this platform before it shrinks completely. Ignoring the code for the trigger event, how would I gradually scale this platform over some time interval t?
(comments are locked)
|
Hello there, this is interesting. would like to know more about this. I can understand the "var startscale" and var endscale" this set the saiz from size A to B correct. Would like to know why "var startscale" used "vector3.one" and "var endscale" used "vector3.zero", whay does is set like that? can both used "vector3.zero"? "var speed" is for the "time.deltatime" right, this is for he transtion speed on the "vector3.lerp" correct? but what is "var t"? and why is "t += time.deltaTime * speed" what does this line do actually? and using "while" will scale the gameobject to the desire size would it? do we need to used "while" to have smooth transtion of the gameobject or there's another method? in the "transform.localscale" why is there no "+" sign before the "=" sign? thanks in advance.
Jan 11 '12 at 08:39 AM
hizral84
Please don't dig up old posts to ask stupid questions. If you have basic programming questions to ask, go to google. If you have basic unity-specific questions to ask, use the search-bar at the top-right side of the page. If you still haven't found your answer, open up a new script file, and mess around a bit. If you still can't work out how it all fits together, or you run into a problem, then create a new question, and I'm sure somebody will be there to help you.
Jan 11 '12 at 08:51 AM
syclamoth
lol
Jan 11 '12 at 08:52 AM
Lo0NuhtiK
Why yes, yes I am stupid. How did you know that. I did search google and used the search bar at the top right side of the page. I also did mess around a bit with the script. I did understand a bit, just would like to know more that is all. If the way I'm asking making you mad I apologize for that. But there's no harm done asking a question, tips, or guideance.
Jan 12 '12 at 01:49 AM
hizral84
Maybe no harm done, and Unity3D specific questions are more-than-welcome here, but this Q&A forum isn't intended to serve as a basic programming tutorial session. Tips etc is given quite frequently here, I've seen, but this isn't the place to 'ask' for them.
Jan 12 '12 at 02:05 AM
Lo0NuhtiK
(comments are locked)
|
|
Seriously? Who are you to dictate who can ask a question in a unity "Answers" forum? The search in google resulted in this page. What google showed me is that being a dick is the result of not being able to provide an answer. Sorry if the question was above your head.
(comments are locked)
|
|
LoONuhtiK, seriously. Who are you to dictate who can ask what? The search in google resulted in this page. What google showed me is that being a dick is the result of not being able to provide an answer. Sorry if the question was above your head.
(comments are locked)
|
|
Please: Why does my instanced prefab appear with my final scale and doesn't do gradually?. I can't write the yield instruction because I'm in an Update function, maybe this is the problem...What would you do with it?. Thanks in adavance.
(comments are locked)
|
