OK, I was able to get the demo to work. Now my problem is applying it to my program. I am very confused with EZro_Orbit command. When I apply it I still get the Center of the object rotating, not the right offset. Here is the cliplet of what is called:
rem ===== Load Wood Door #1 here =======
MAKE OBJECT BOX 31,55,78,5
POSITION OBJECT 31,1800,543,-1950
YROTATE OBJECT 31,90
LOAD IMAGE "dungeon/Wood Door.jpg",1
TEXTURE OBJECT 31,1
do
Rem =====Open Wood Door #1 here ========
IF int(px#) = 1840 and direction = 0 and DoorAngle >90 and int(pz#) > -1985 and int(pz#) < -1914 then Direction = 1: gosub opendoor
loop
end
opendoor:
for xx = 1 to 90
`Setup EZrotate with object's current rotation
EZro_SetEuler OBJECT ANGLE X(31),OBJECT ANGLE Y(31),OBJECT ANGLE Z(31)
`Setup EZrotate with object's current position
EZro_SetPos OBJECT POSITION X(31),OBJECT POSITION Y(31),OBJECT POSITION Z(31)
`Orbit Object on Left Side of Door
IF direction = 0
EZro_Orbit 1,1800,543,-1950,1800,543,-1950,1
DoorAngle = DoorAngle + 1
ENDIF
IF direction = 1
EZro_Orbit 1,1800,543,-1950,1800,543,-1950,-1
DoorAngle = DoorAngle - 1
ENDIF
`CALCULATE new Euler angles for object
EZro_FindEuler
`Apply new Rotation to Object
ROTATE OBJECT 31,EZro_GetEulerX(),EZro_GetEulerY(),EZro_GetEulerZ()
`Apply new Position to Object
POSITION OBJECT 31,EZro_GetPosX(),EZro_GetPosY(),EZro_GetPosZ()
next xx
RETURN
I am trying to at least get the door to open first. I am guessing the the coordinates for EZro_Orbit is the position of the Object. I am in no way a math major but I could use some help with this one please.
Old Programmer's are not ugly; they are just Visually BASIC.