26.04.2013, 16:17
I'm trying to rotate the bank vault door in the Caligulas Vault around the hinges. Unfortunately the MoveObject() rotation parameters rotate the object around the center, which messes it up, as seen here:
[ame]http://www.youtube.com/watch?v=clwfI9Id4qY[/ame]
I need it to rotate around the hinges..

(And yes, I do have the handwriting of a 5 year old (+ I rushed!) :x)
Curved line drawn accurately with a compass
X = Center of the vault door object
The corner is the HINGES of the door, around which I want to rotate the door
The straight line from the X to the X is the MoveObject() POSITION interpolation, which is the problem
The dashed (well, outlined with dashed lines because I forgot) is the line which the position NEEDS to interpolate around to work
The door will move from rotation 180 -> 270 (90 degrees). I will use a fast timer to move it in 90 steps, one degree at a time. I just need to work out how to calculate the position. It will of course also have to be relative to wherever the door is.
If anything isn't clear, please let me know and I'll try to explain further. It seems fairly simple though.
Information that may be required:
Width (here ------ to here) of vault door: 1.99 in-game units (meters?) I guess it can be rounded to 2..
Here the script used in the video: http://pastebin.com/jJcgPsYL
Thank you :<
EDIT:
I just had an idea - perhaps I can use a mid-point to at least make it a BIT better:
[ame]http://www.youtube.com/watch?v=clwfI9Id4qY[/ame]
I need it to rotate around the hinges..

(And yes, I do have the handwriting of a 5 year old (+ I rushed!) :x)
Curved line drawn accurately with a compass
X = Center of the vault door object
The corner is the HINGES of the door, around which I want to rotate the door
The straight line from the X to the X is the MoveObject() POSITION interpolation, which is the problem
The dashed (well, outlined with dashed lines because I forgot) is the line which the position NEEDS to interpolate around to work
The door will move from rotation 180 -> 270 (90 degrees). I will use a fast timer to move it in 90 steps, one degree at a time. I just need to work out how to calculate the position. It will of course also have to be relative to wherever the door is.
If anything isn't clear, please let me know and I'll try to explain further. It seems fairly simple though.
Information that may be required:
Width (here ------ to here) of vault door: 1.99 in-game units (meters?) I guess it can be rounded to 2..
Here the script used in the video: http://pastebin.com/jJcgPsYL
Thank you :<
EDIT:
I just had an idea - perhaps I can use a mid-point to at least make it a BIT better:
