Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D dynamics, collision, trigger?

  • dynamics, collision, trigger?

    Posted by Alex Shackleton on September 25, 2012 at 12:31 pm

    Hi there

    I have a scene with a box connected to two wheels that are driven by motors. I have put this into a floor with four walls. When the box hits the walls I want the box to turn around or reverse instead of just stopping dead on collision. I wanted to do something where the collision from the wall triggers the reverse event using xpresso however I’m am not too sure how to do this. Below is a link to the cinema file I have been working on

    https://www.mediafire.com/?3mi6ab29b8cil3l

    Thanks
    Al

    Alex Shackleton replied 13 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Seth Olson

    September 25, 2012 at 4:39 pm

    I moved the Xpresso tag from the car to a Null called “Xpresso” for easy finding.

    The floor and walls are combined, which makes collision detection by Xpresso impossible. I couldn’t find a way to have a concave collision object. You need to have separate objects for each wall and use an “objectlist” with all the parts inside as your collision object.

    Collision in Xpresso also requires editable objects (press C to make editable), so I used a hidden collision object in its place that sticks out only on the front and back.

    To summarize the Xpresso set-up, I used a collision node to check. If collision occurred, toggle the “flipflip” node. This went to a switch, turning a “1 or 0” to a “1 or -1”. This then multiplied against the desired speed and output to each motor. Each step has a “result” node, so I can see if it was working.

    Also, the dynamic tags must have enough bounce to push the object away, otherwise, it will continually switch directions back and forth and get stuck.

    Check out the file attached. I have like a month of experience with C4D and would love to hear other possible solutions. Also, please show me what you do with it! 😀

    4698_selfmovingcubesso04.c4d.zip

  • Alex Shackleton

    September 26, 2012 at 3:17 pm

    cheers mate that’s great.

    Wow really a month of c4d? Xpresso’s really advanced for a month!Im very inexperienced when it comes to xpresso and this has shown me a lot of stuff. Yeah I will post what I do with it.

    Thanks for your help again!

    Al

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