Incrementally scale object using logic
I have a level (an Agar.io clone) where I need shapes to incrementally grow or shrink based on a variable.
Keyframes are NOT an option because I'm not going to manually keyframe 1000+ different sizes.
I've already tried using an emitter to take the current position of the shape, destroy it and emit a new one slightly bigger in its place.
This kind of works but (a) there is a slight (but awful) delay where you cannot move, (b) the imp flies out and back into the new controller sensor and makes the horrible imp possession noise.
I'm out of ideas. Anyone?
-
Keyframes are totally the answer and you only need two!
Create a Timeline gadget
Add two keyframes at the start and end
Edit the start keyframe and shrink your circle to the minimum size
Edit the end keyframe and grow your circle to the maximum size
L1 + X in the space between the two KF to create a linear animation
Set the timeline to a play speed of 0
Wire a signal to the playhead position of the Timeline gadget.
Now you can send a signal of between 0 and 1 along that wire and you can grow the object to a specific point along the timeline!
You will probably want a Signal Manipulator in there at some point to smoothly transition between points of the timeline considering it is now under your control but that's the next step. Do you think this will help at least in dynamically resizing things? -
Worth mentioning also that the longer the timeline is the more granular control you will have over the size. Making the timeline 10s long will give you 100 steps at .1s division. Making it 100s long would give you thousands of increments :-)
-
*a thousand not thousands, sorry.
-
As meantioned, keayframes should help you. Because strength of the signal affect how much the keaframe affect the object. So you need small object. One keyframe that will make it big. And then use logic to sent 0-100% signal to change size in small increments.
-
That's really cool Agarwel, I had no idea you could power a Keyframe incrementally. This is better than my suggestion because it uses less gadgets.
-
Agarwel...okay, that's neat. i can see all kinds of possibilities for that.
-
Thanks for all the responses! I didn't have time to try this before I had to leave for the weekend but it sounds exactly like what I wanted. Can't wait to get back home and implement it!
Accedi per aggiungere un commento.