[HELP]Howto make a nice door

albino

14-11-2006 08:48:16

Hi

How can i make a door which is dragable and it cant be rotated 360 degrees, only limited angle? I have made it dragable so far with hinge joint.

albino

16-11-2006 06:06:57

now i changed the join from hinge to ballandsocket because i saw that ball and socket has setLimits function, but how do i set the limit so that the door opens only outside, i set the limit to 120 degrees but now it opens the door both inside and outside.

Do I have to rotate the door or somethnig to make it possible to open it only outside?

walaber

17-11-2006 06:14:27

you can apply limits to a hinge joint.. you just need to make a callback function for it. I would recommend this over the ballandsocket joint for a door!

albino

17-11-2006 11:56:38

hmm... ok, but does it cause the same problem as if using ball and sockets, the door rotates 90 degrees in both directions?

how exactly i make the callback function? better get working with it :lol:

lonwolf

19-11-2006 16:12:21

by creating 2 balls and socket joints you make a stable door. and if you want to use setLimit() set it to 90 and rotate the door in such way that the left limit is the door_closed position and the right: door_oped_at_90_degrees :)

albino

19-11-2006 17:15:19

i had two ball and socket joints, it seemed easier than making hinge and some callback stuff

Is there some bad side effects when using ball and socket joints instead of hinge?