Add random number to position of object
Inviato: ven feb 21, 2014 12:47 pm
Hello guys,
This forum already helped me with an xpresso problem. Thanks a lot for that. But now I have another issue, that keeps coming back. Let me explain:
I want a cube to be moved randomly after a certain amount of frames.
I set up an expression that gives out numbers after a certain amount of frames and plugs it into the x-coordinates of the cube.
The problem is, that it will only jump to the new position for the n-th frame and then jump back.
What I'm trying to achive is to generate a random number, then add that number to the current position of the cube and hold it there until I get the next random number after the n-th frame. I assume there's some programming involved? It seems like a loop, that doesn't work, if I need to take the x-pos from a cube to add it to a random number and plug it back into the x-pos of the cube. I need to find a way to get the position of the cube just for the n-th frame. Can anyone help me out on this?
Thank you guy for your help
Benjamin
This forum already helped me with an xpresso problem. Thanks a lot for that. But now I have another issue, that keeps coming back. Let me explain:
I want a cube to be moved randomly after a certain amount of frames.
I set up an expression that gives out numbers after a certain amount of frames and plugs it into the x-coordinates of the cube.
The problem is, that it will only jump to the new position for the n-th frame and then jump back.
What I'm trying to achive is to generate a random number, then add that number to the current position of the cube and hold it there until I get the next random number after the n-th frame. I assume there's some programming involved? It seems like a loop, that doesn't work, if I need to take the x-pos from a cube to add it to a random number and plug it back into the x-pos of the cube. I need to find a way to get the position of the cube just for the n-th frame. Can anyone help me out on this?
Thank you guy for your help
Benjamin