Welcome to the Cinema 4D Forum

Forum Moderators:  cartesius   

Cinema 4D F.A.Q (Updated: 2007 Jul 13 6:44 pm)

C4D Gallery Speed Modeling Sessions C4D Freestuff
 
 
Checkout the Renderosity MarketPlace - Your source for digital art content!


 Subject: Xpresso Question

Einzelganger opened this issue on Feb 03, 2013 · 10 posts

Top of Forum Print

  Einzelganger ()  ( posted at 2:10AM Sun, 03 February 2013 

Hey all,

 

 I have a simple xpresso setup where a cube rotates 90o when it is hit by another object.

trouble is the cube goes grom 0-90o instantly, i cant work out how to make the cube rotate over a set number of frames.

how can this be done?

thanks.

 

 D.


  raymondsalter ()  ( posted at 2:11PM Sun, 03 February 2013 · edited on 2:14PM Sun, 03 February 2013

Hi bud you could try some think like this written in 14 https://www.dropbox.com/s/l6luecv2t5rh49k/rotating%20cube_0003.c4d?m

 Cheers

        Ray.


  Einzelganger ()  ( posted at 4:55PM Sun, 03 February 2013 

Thanks Ray, got to sleep now, but i will try it tomorrow.

 

 D.


  kuroyume0161 ()  ( posted at 4:59PM Sun, 03 February 2013 

There is a two-part tutorial on 'automatic rotation' (over time) in the Cinema 4D Help.  Just type in 'Xpresso' in the Search and follow the "Xpresso Tutorials" link in the search results.  Hint: there is a Time node in Xpresso. :)

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


  Einzelganger ()  ( posted at 12:53AM Mon, 04 February 2013 

Ah, so what you are saying is "RTFM"? ;)

good point though, its just that i am not used to the 4d manual actually being usefull :D

 

cheers.


  samiwas ()  ( posted at 12:05AM Fri, 08 February 2013 

I wrote an Xpresso set which does just that.  It uses the "current" rotation, the target rotation, but only allows it to rotate a certain number of degrees per frame, based on a chosen time.  So if it's said that the object can rotate 360 degrees in 5 seconds, the nodes will allow the object to rotate 2.4 degrees per frame until it hits the target.

There might be more efficient ways to do it, but that's what I did.  I can post it if you want.


  Einzelganger ()  ( posted at 12:22AM Fri, 08 February 2013 

Please do, i haven't had a chance to try the other reply's yet.

the more options the beter ;D

 

cheers.


  samiwas ()  ( posted at 12:29AM Fri, 08 February 2013 

OK...it's late tonight, and I travel all day tomorrow.  It might be a couple of days, but i will try to get it posted here.


  roobol ()  ( posted at 12:02PM Mon, 11 February 2013 


Very nice  solution by raymondsalter, congrats.  If you are not familiar with Python you could also use a monoflop for rotation triggered by collision and a compare node to reset the whole bunch.

http://www.roobol.be


  Einzelganger ()  ( posted at 12:26PM Mon, 11 February 2013 

Thanks roobol, a bit easyer to follow than raymondsalter's :D

i am only just getting into Xpresso basics.

thanks all.


 To create a post you must first sign in or register an account.