Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Reverse direction on collision

  • Reverse direction on collision

    Posted by Jack Cook on January 2, 2007 at 6:53 pm

    I have an animation where Object1 goes up and down (Y axis only) and has to contact Object2 above it and then reverse direction, returning to it’s original starting point, then going up again over and over. Object2 is a rough object, so the collision point isn’t in the same place each time. Also, I want Object1 to move at the same relative speed as it goes up and down, no matter how far it has to travel.

    I’ve thought of Xpresso for this, and using the Collision node, but I’m not an “Xpresso-thinker,” so I’m having difficulties figuring out how to do this. I also thought maybe set driven keys might work for it somehow, but I don’t know how to go about implementing all this. What do you think the best way is to proceed in doing this kind of thing?

    thanks,
    Jack

    Jack Cook replied 19 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Mylenium

    January 3, 2007 at 5:41 am

    [Jack Cook] “Object2 is a rough object, so the collision point isn’t in the same place each time. Also, I want Object1 to move at the same relative speed as it goes up and down, no matter how far it has to travel.”

    Kind of sounds mutually exclusive – if your collision target is moving at a certain constant speed, the other object can’t do the same. It will inevitably move faster or slower depending on the distance it has to travel. As for implemneting it – well, the collision node outputs true/ flase (equal to on and off), so it could be plugged into another node to switch it. This could be anything from a monoflop to a range mapper. In the latter case your simply set the output range to -1 and 1 and then use those values to multiply your position Y values, the negative and positive effectively defining the direction vector. Unless your object is moving very fast, it’s not going to look too convincing, though, as it will be an abrupt change in speed.

    Mylenium

    [Pour Myl

  • Jack Cook

    January 10, 2007 at 12:47 pm

    Mylenium,

    Thanks for your suggestion. I messed around with it for a bit but couldn’t get it to work (mainly because of my nonfamiliarity with all but the most basic things in Xpresso). I finally decided to do it by hand, and went through setting keyframes wherever I needed to to make it work. I intend to play around with this though, to see if I can learn more about Xpresso. Thanks, again.

    Jack

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy