Search Unity

How to configure constraint to make one object enter into another in one axis only?

Discussion in 'Physics' started by probitaille, Nov 29, 2016.

  1. probitaille

    probitaille

    Joined:
    May 5, 2015
    Posts:
    34
    Hi,

    I try to make one object enter into another. Here's a link to my video showing what I can do actually with Fixed Joint: Youtube

    In this video, you can see that my green handle can enter into my red form when this one collide with another object. That's what I want.

    But, I'm trying to constraint this interaction only on the X axis of the handle, meaning that the red form can't rotate or move if I only push or pull the green handle. Also, I don't want my red form to detach from my handle as you can see in this video.

    How can I solve this problem? I tried the configurable joint but there's too many options for me to get closer to what I can achieve with fixed joint.

    Thank you for the help.