i´m on a point....

hi unity members.

i tried it on the scripting …

i want to connect a caravan to my car put i didn´t get it…
i tried it with the stick grenady script, using a hingejoint, but it wont work :frowning:
is there sombody out there who could explain to me in which direction i should go?

oh please help me :sweat_smile:

parent an empty game object on to your car at “towball” location. use what ever method to parent caravan onto there to connect. Id love to see a pro write that script because no matter how many threads I read about parenting thru scripting it still doesnt seem straightforward. Thats how in theory.

or hinge joint active/inactive
AC

What do you want to do? If your car has a rigidbody and the caravan has a rigidbody, you can use a hinge joint and it should be pretty simple.

If you want to create your own physical relationship between the two entities with a script it will be hard and I am not ready to write an example.

If they don’t have to turn, then it is easy. Grab the caravan object in the hierarchy pane and drag it onto the car object. Now the caravan is part of the car and will follow it around.

i just get it work right after posting here…

the way with two rigidbodys ist the solution.

i just forgot to give the hinge-joint the right vector3 axis.

i will post the script later on.

now i have activate/deactivate the script with a input key.

puuh i was realy frustrated. but again unity makes me happy :slight_smile: