Need help with door object modification
by Shaderman · in Technical Issues · 01/22/2008 (4:38 am) · 1 replies
Hi,
I'm trying to modify the door object code or door object part 2 to get a "always push open" functionality for rotating doors. Depending on which side of the door the player is, the rotation direction should be set.
I've got a script function to determine on which side of the door the player is when triggering the door and a ConsoleMethod to set a boolean member variable (left side = false, right side = true) in the door class.
Now I'd like to set the door's rotation direction in the Door::handleDoorRotation() function (which is called by Door::processTick()), depending on the value of the boolean member variable which - I don't see the reason - changes randomly with several Door::processTick() calls (during a rotation progress).
Any idea what might cause this change?
Please let me know if you need more information or maybe code snippets from me.
Thanks in advance.
Shaderman
I'm trying to modify the door object code or door object part 2 to get a "always push open" functionality for rotating doors. Depending on which side of the door the player is, the rotation direction should be set.
I've got a script function to determine on which side of the door the player is when triggering the door and a ConsoleMethod to set a boolean member variable (left side = false, right side = true) in the door class.
Now I'd like to set the door's rotation direction in the Door::handleDoorRotation() function (which is called by Door::processTick()), depending on the value of the boolean member variable which - I don't see the reason - changes randomly with several Door::processTick() calls (during a rotation progress).
Any idea what might cause this change?
Please let me know if you need more information or maybe code snippets from me.
Thanks in advance.
Shaderman
Torque Owner Shaderman
No ideas/suggestions?