• Facebook Twitter Google+ Youtube Vimeo
  • Italiano English
  • [-] Diminuisci la dimensione del testo [+] Aumenta la dimensione del testo
  • Feed RSS 2.0 Feed ATOM 1.0

»

Add random number to position of object

Forum for: Dynamics, Rigging, Mograph, TeamRender, Xpresso, Plugins, Hair, Sketch, Simulation, tracking, sculpt and advanced usage of Cinema4D.

Moderatori: natas, Arkimed, visualtricks, cappellaiomatto

  • Advertising

Add random number to position of object

Messaggioda Benicarus » ven feb 21, 2014 1: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
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
Benicarus
 
Messaggi: 2
Iscritto il: ven feb 21, 2014 12:33 pm

Re: Add random number to position of object

Messaggioda cappellaiomatto » ven feb 21, 2014 5:34 pm

Hi Benjamin
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
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
Avatar utente
cappellaiomatto
Moderatore
 
Messaggi: 1411
Iscritto il: lun mag 07, 2012 5:12 pm

Re: Add random number to position of object

Messaggioda Benicarus » sab feb 22, 2014 8:26 pm

Awesome! Thank you so much for the help.

I'll check it out in a bit and let you know how it went.

Thanks again-
Benicarus
 
Messaggi: 2
Iscritto il: ven feb 21, 2014 12:33 pm


  • Advertising

Torna a C4D - Advanced usage

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite

Powered by DGworld CMS - Copyright ©2005-2018 DGworld