07-30-2011, 09:42 PM
07-30-2011, 10:04 PM
Use these functions to make the door open.
SetSwingDoorDisableAutoClose(string& asName, true);
SetSwingDoorClosed(string& asName, false, false);
AddPropImpulse(string& asName, float afX, float afY, float afZ, "World");
Fiddle with the float values to make the door open. Look at the door in your level editor. The blue line is the Z axis, the red line is the X axis. You'll probably not need any Y value (green line) unless you have a door leading through the roof or something weird like that.
SetSwingDoorDisableAutoClose(string& asName, true);
SetSwingDoorClosed(string& asName, false, false);
AddPropImpulse(string& asName, float afX, float afY, float afZ, "World");
Fiddle with the float values to make the door open. Look at the door in your level editor. The blue line is the Z axis, the red line is the X axis. You'll probably not need any Y value (green line) unless you have a door leading through the roof or something weird like that.
07-30-2011, 10:04 PM
Code:
AddPropForce(string& asName, float afX, float afY, float afZ, string& asCoordSystem);
afX - direction along the X-axis
afY - direction along the Y-axis
afZ - direction along the Z-axis
asCoordSystem - determines which coordinate system is used, usually “world”
You have to use quite big numbers for doors, I think, but if your float isn't that big, it should open slowly
07-30-2011, 10:23 PM
For a door, try the force of 1 - 3 in the correct direction. When I tried 5, it blasted open and closed fast... :/