Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open a door with script
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#11
RE: Open a door with script

(01-09-2011, 03:36 PM)Andross Wrote:
AddPropForce("MyDoor", 100.0f, 0.0f, 0.0f, "World");
That's how I implemented it successfully at various locations (as well as the developers Smile).
The example assumes that your door swings open towards the x-axis. If I remember it correctly, 100.0 is not enough to open the door completely, so you might have to either call this multiple times by means of a timer or adjust the force value.

Figure out what force you have to apply to it to get it to open when the door object's y rotation is 0, then just change "world" to "local". Then you don't have to worry about having the force in the right direction, as it's local and will rotate with the door.
01-10-2011, 04:29 AM
Find




Users browsing this thread: 3 Guest(s)