hinge joint not moving objects together
I am trying to make a garage door that rolls along the rails when a button is pressed. I know I am not the first person to attempt this, but I have not been able to find any videos/descriptions on how to do this in unity. My thought is to sculpt the rails, and add a wheel collider to each of the points where a caster would be on a real garage door. I'm thinking (as I am newer to Unity) that this will allow it to pull the doors in the right motion along that track when a force is exerted. Each section of the door has a hinge joint between them as well. I have a center hinge sculpted, and have a script that moves the hinge along the center rail when a button is pressed. This works very well, however it only moves that piece. I tried attaching it to the top of the door with various joints (I keep thinking hinge joint is the best) but the problem remains that when I play it, the garage door stays where it is, and simply detaches. Perhaps there is a simpler way to do all of this, and I am very open to suggestions, but I have been trying all day without any success. Ideally, I would be able to allow the player to press a button, and the garage door moves. Maybe I am using the wrong type of joint? maybe I'm not setting it up properly? As a side note, I also am attempting to do this without animations. The other doors I have in my scenes and projects all work very well without animation, and if possible, I want to continue that, as I was told by someone that animations are more processor intensive than using coding to transform/rotate/etc. Not to mention, there is much less setup involved from what I've experienced. Any and all help would be greatly appreciated.
Answer by SmartCarrion · Oct 06, 2016 at 09:02 AM
Hopefully you decided to use something like DOTween paths or an animation for this...doing it with physics simulation is overkill
Your answer
Follow this Question
Related Questions
Connecting objects on collision 0 Answers
Is possible to make joints acting like parents and childs ? 1 Answer
Making physics more precise for tiny objects. 0 Answers
Draw Line Between Distance Joint 2D and Position 0 Answers
How to make a chain of physical objects between two kinematic objects that are moved around? 0 Answers