So I have a sliding door that currently works by moving the door on the x axis to open and close it.
Problem is, what if I want to move the door somewhere else in another rotation? If I change that, the door won't be sliding on the x axis and may be sliding on the z axis, or if it's reversed on the x axis.. in that case I have to go in the script and change it from subtracting from the x axis but that takes longer, and what about the z?
I know that was confusing, but I would like to know if there's an easy way to script it and make it determine which direction is the direction I need it to move, perhaps detecting which direction the FrontSurface of a part is?
|