Welcome to the Cinema 4D Forum

Forum Moderators: cartesius

Cinema 4D F.A.Q. (last updated 2007-07-13 18:44:56)








Checkout the Renderosity MarketPlace - Your source for digital art content!

Subject: Xpresso Question

Author
Message

Einzelganger  

Homepage »

Stats

Back to Top

Posted Sun, Feb 3, 2013 2:10 am

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.

Quote  Report Print Save

raymondsalter  

Homepage »

Stats

Back to Top

Posted Sun, Feb 3, 2013 2:11 pm, Edited Sun, Feb 3, 2013 2:14 pm

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.

Quote  Report Print Save

Einzelganger  

Homepage »

Stats

Back to Top

Posted Sun, Feb 3, 2013 4:55 pm

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


 


 D.

Quote  Report Print Save

kuroyume0161  

Homepage »

Stats

Back to Top

Posted Sun, Feb 3, 2013 4:59 pm

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

Quote  Report Print Save

Einzelganger  

Homepage »

Stats

Back to Top

Posted Mon, Feb 4, 2013 12:53 am

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.

Quote  Report Print Save

samiwas  

Homepage »

Stats

Back to Top

Posted Fri, Feb 8, 2013 12:05 am

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.

Quote  Report Print Save

Einzelganger  

Homepage »

Stats

Back to Top

Posted Fri, Feb 8, 2013 12:22 am

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


the more options the beter ;D


 


cheers.

Quote  Report Print Save

samiwas  

Homepage »

Stats

Back to Top

Posted Fri, Feb 8, 2013 12:29 am

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.

Quote  Report Print Save

roobol  

Homepage »

Stats

Back to Top

Posted Mon, Feb 11, 2013 12:02 pm

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

Quote  Report Print Save

Einzelganger  

Homepage »

Stats

Back to Top

Posted Mon, Feb 11, 2013 12:26 pm

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


i am only just getting into Xpresso basics.


thanks all.

Quote  Report Print Save

Unread Post(s) Unread Announcement You are a visitor.

You cannot post new threads.
You cannot reply to threads.
You cannot edit your posts.
You cannot delete your posts.
Read Post(s) Read Announcement
Unread Post(s) (Locked) Unread Sticky
Read Post(s) (Locked) Read Sticky
 
Powered by Bondware
Newspaper Software | Email Marketing Tools | E-Commerce Marketplace