property p3DWorld property p3DModel property piLocH property piLocV on beginSprite(me) p3DWorld = sprite(me.spriteNum).member p3DWorld.camera(1).transform.position = vector(0, 0, 360) end beginSprite on mouseDown(me) if p3DWorld.model.count then p3DModel = p3DWorld.model(1) else exit end if if the shiftDown then p3DModel.transform.identity() end if piLocH = the mouseH piLocV = the mouseV end mouseDown on exitFrame(me) if piLocH then if the mouseDown then me.mRotate() else piLocH = VOID piLocV = VOID end if end if end exitFrame on mRotate(me) ------------------------------------------------------- -- -- -- -------------------------------------------------------------------- tDeltaH = (the mouseH - piLocH) / 32.0 tDeltaV = (the mouseV - piLocV) / 32.0 p3DModel.rotate(tDeltaV, tDeltaH, 0, #world) end mRotate