Add random number to position of object
Moderatori: Arkimed, natas, visualtricks, cappellaiomatto
-
- Advertising
Add random number to position of object
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
- Allegati
-
- Random_position.zip
- (53.37 KiB) Scaricato 113 volte
- cappellaiomatto
- Moderatore
- Messaggi: 1572
- Iscritto il: lun mag 07, 2012 5:12 pm
Re: Add random number to position of object
if I understand what you need in the attachment you will find the solution.
Just track the cube to the position of another object like a null
on the X th frame apply the random position.....in order to control the amount of x shift adjust the range mapper, it's more simple and easy to manage instead of a math division
PS
if you need to post a file zip it and use the attachment system of our forum in the future
- Allegati
-
- Random_position_2.zip
- (61.99 KiB) Scaricato 138 volte
Follow me on Twitter https://twitter.com/matteoc4dzone
Follow me on Vimeo https://vimeo.com/cappellaiomatto
Re: Add random number to position of object
I'll check it out in a bit and let you know how it went.
Thanks again-
-
- Advertising
FOLLOW US