Doors

dbrock

14-02-2008 02:51:33

Hey guys,

I'm working on a door class basically that would contain a body, and I'm guessing I would just need a joint or a hinge for it to swing/rotate around? Just looking to get some ideas flowing before I start writing it. I don't want it to open unless the players "action" key was hit, and I guess that would be simple to check for as long as the player is colliding with the door, which I could check through hit reports, or ray casts and check against the distance?

Thanks

betajaen

14-02-2008 09:08:13

A Revolute with a Body/Actor as you said. You could encompass the door and nearby area with a trigger, and freeze movement of the door when no character is in the trigger and unfreeze it when they do.