#1
|
|||
|
|||
Moving objects smoothly
Hey,
does anyone know how to make a movement of an object smooth? I mean that the acceleration and breaking process is smooth and gives it a more realistic feeling? Thanks a lot flip321 |
#2
|
|||
|
|||
Can you provide more detail about what you are trying to do?
|
#3
|
|||
|
|||
Of course:
Let's say I want to move an imported 3D-object from it's position to the center of the stage/screen whatever with the coordinates [0,0,0]. The skript works, but in order to make it look more realistic in a physical way, I want the beginning of the movement progress to start slower as well as the ending of the movement. In other words I want the speed of the movement to increase in the beginning and decrease in the end, and NOT to have a constant movement speed over the whole time. Here's a part of the script I'm using right now: Quote:
Thanks a lot, Philipp |
#4
|
|||
|
|||
If you have some t, going linearly from 0.0 to 1.0, first transform it before passing it to setPosition or whatever move function.
Example for slow in, slow out: new_t = (1.0 - math.cos(math.pi * t)) * 0.5 bonus for fast in, slow out: new_t = math.sin(((1.0 - t) ** 2 + 1) * math.pi / 2.0) ** 2 these new_t values will lie between 0.0 and 1.0 as well. |
#5
|
|||
|
|||
hm, could you add this into my example skript? I can't really picture who I should integrate it...
Isn't there any easier way like giving an extra parameter along with the "move function" in order to get the same results? But thanks a lot in advance!!! I appreciate it! |
#6
|
|||
|
|||
Better approach: see the help for interpolation modes, for instance:
Code:
def show_moviepreviews(): moveToStage = vizact.moveTo([0, 0, 0], time=1, interpolate=vizact.easeInOut) movie_icon.addAction(moveToStage) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving objects together | imperialkat | Vizard | 2 | 02-17-2010 12:43 PM |
Semi-circle array containing target and distractor objects | ptjt255 | Vizard | 3 | 08-04-2009 03:09 AM |
Lightwave objects rotation problem | hosier | Vizard | 6 | 02-13-2009 12:04 PM |
Moving multiple objects with ppt | durf | Vizard | 1 | 02-10-2009 03:03 PM |
Could not find plugin to load objects... | halley | Vizard | 1 | 05-30-2006 11:01 AM |