Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Xpresso: linking rotation to movement velocity and direction?

  • Xpresso: linking rotation to movement velocity and direction?

    Posted by Barend Onneweer on October 29, 2010 at 9:18 pm

    Hi, an Xpresso question…

    I’d like an object to ‘lean into it’s movement’ a little. So when I move it in direction X, it will rotate a bit (along the z axis) and thus lean into the movement.

    It seems I can get “position velocity” from an object in Xpresso – but I can’t really get the result I’m looking for yet.

    Any Xpresso wizards in here?

    Cheers,

    Barend

    Barend Onneweer replied 15 years, 6 months ago 2 Members · 3 Replies
  • 3 Replies
  • Barend Onneweer

    October 30, 2010 at 8:04 am

    Okay, I’ll see if I can add some ideas.

    I think what I’d need is some Xpresso that aligns the object to it’s motionpath – but the amount would be triggered by the speed of movement.

    On a descriptive level I think it might work like this:

    1) Calculate motion direction by comparing current position to previous position.

    2) Compare current (keyframed) rotation with the motion direction and calculate the transform needed to align the object fully to it’s motion path.

    3) Calculate speed of movement and use it to control the amount of transform that is mixed in.

    So the faster the object moves the more it will be aligned to the motionpath.

    But I’m lost in trying to build this…

    Raamw3rk – digital storytelling and visual effects

  • Randy Johnson

    October 30, 2010 at 10:26 am

    Here is how I do that.

    Uploaded with Skitch!
    Uploaded with Skitch!

    I learned this off the base80.com site while back…. I highly recommend his site if you want loads of these tips.

    I just saw I have the Math Node set to ADD that is wrong swap that to subtract.

    /Randy

  • Barend Onneweer

    October 30, 2010 at 10:37 am

    Hi,

    Thanks for thinking along.

    Actually what you’re doing is basing rotation on the accelleration, but by coincidence I just stumbled upon that example at Base80 and it did help me get to a solution, I think.

    I’m using the Position Velocity > Vector2Reals into a Math Divide into the object rotation.

    I need to tinker a bit more to see if it does everything I need.

    Barend

    Raamw3rk – digital storytelling and visual effects

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