Code/Example Adding auto camera panning of tables.

Coding and examples for future Pinball and BAM

HZR

Pinball Hall of Famer
Site Supporters
Joined
Aug 17, 2021
Messages
557
Solutions
1
Reaction score
175
Points
56
Favorite Pinball Machine
elm street
Can someone help me add camera Panning to my tables.
Meaning when a table loads the camera will go around the machine and table, I would like to add this for my cabinet. Any help appreciated. I tried adding this script but it didnt work. Figured I may ask before I spend hours on something that may be simple
example

''''''''''''''''''''''''''''''''''''''''''Camera Settings'''''''''''''''''''''''''''''''''''''''''''''''''

If xBAM.Camera.Mode = xBAM_Camera_Desktop then DesktopMode = True
If xBAM.Camera.Mode = xBAM_Camera_Cabinet Then DesktopMode = False


'Desktop Camera sequence for Panning
xBAM.Camera.DesktopSequenceBegin 10
xBAM.Camera.DesktopSequenceAddEntry -725, 1869, 928.6, 690.1, -22.6, 110.6, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 1275, 1869, 916.7, 220.3, -114.6, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 344.8, 1869, 1068.6, 297.9, -371.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 372.8, 1800.8, 948.8, 352.8, -102.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 192.6, 558.3, 0, 50, 8000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 10000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 3000
xBAM.Camera.DesktopSequenceAddEntry 275, 1421.5, 450, 275, 434, 0, 50, 3000
xBAM.Camera.DesktopSequenceEnd

'Cabinet Camera sequence for Panning
xBAM.Camera.CabinetSequenceBegin 11
xBAM.Camera.CabinetSequenceAddEntry 0, 0, 0, 1, 1, 1, 0, 0, 0, 5000
xBAM.Camera.CabinetSequenceAddEntry 0, 1200, -500, 2, 2, 1.1, 20, -0, 0, 10000
xBAM.Camera.CabinetSequenceAddEntry -1700, 800, -600, 2, 2, 1.1, 20, 0, -70, 10000
xBAM.Camera.CabinetSequenceAddEntry 1700, 800, -600, 2, 2, 1.1, 20, -0, 70, 10000
xBAM.Camera.CabinetSequenceEnd


Sub CheckCamera()
If xBAM.Camera.Mode = xBAM_Camera_Desktop and RoomCamera = 1 Then
DesktopMode = True
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If
If xBAM.Camera.Mode = xBAM_Camera_Desktop and RoomCamera = 2 Then
DesktopMode = True
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If
If xBAM.Camera.Mode = xBAM_Camera_Desktop and RoomCamera = 3 Then
DesktopMode = True
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If

If xBAM.Camera.Mode = xBAM_Camera_Desktop then
DesktopMode = True

If RoomCamera = 0 then nvR2 = 0:xBAM.Camera.DesktopRelease
If RoomCamera = 1 then nvR2 = 1:xBAM.Camera.DesktopSequencePlay 10
If RoomCamera = 2 then nvR2 = 2:xBAM.Camera.DesktopSequencePlay 10
If RoomCamera = 3 then nvR2 = 3:xBAM.Camera.DesktopRelease
End if

If xBAM.Camera.Mode = xBAM_Camera_Cabinet and RoomCamera = 1 Then
DesktopMode = False
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If
If xBAM.Camera.Mode = xBAM_Camera_Cabinet and RoomCamera = 2 Then
DesktopMode = False
If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if
End If

If xBAM.Camera.Mode = xBAM_Camera_Cabinet then
DesktopMode = False
If RoomCamera = 0 then nvR2 = 0:xBAM.Camera.CabinetRelease
If RoomCamera = 1 then nvR2 = 1:xBAM.Camera.CabinetSequencePlay 11
End if
End Sub

''''''''''''''''''''''''''''''''''''''''''''''End if Camera Settings''''''''''''''''''''''''''''''''''
 
Can someone help me add camera Panning to my tables.
Meaning when a table loads the camera will go around the machine and table, I would like to add this for my cabinet. Any help appreciated. I tried adding this script but it didnt work. Figured I may ask before I spend hours on something that may be simple
example
in fp,con il tasto f7 hai la panoramica, chiamata fixed view...
in fp, with the f7 key you have the overview, called fixed view ...
Cattura1.JPG


invece se vuoi un codice di Bam,che ti permette ad ogni avvio di fp,la panoramica per il tuo cabinet,ecco cosa devi fare
devi creare la tua "custom camera" in questo modo:

instead if you want a Bam code, which allows you at each fp start the overview for your cabinet, here's what you need to do you have to create your "custom camera" in this way;


io spiego come creare la tua "custom camera" ci sono dei miei video e una demo
I explain how to create your "custom camera" there are my videos and a demo

se hai difficoltà dimmelo,sono felice di aiutare
if you have difficulty tell me, i am happy to help

ciao
 
Last edited:
Indiana Jones enhanced.
That's where I snagged the script.
I like the panning of this script. Just havent gotten it working.
It pans once the table loads so I dont know what triggers it.
I dont know script.

If I have the cam settings can I just paste the script at tue beginning of each table script.
So they are all the same.
Fast and easy?
 
Indiana Jones enhanced.
That's where I snagged the script.
I like the panning of this script. Just havent gotten it working.
It pans once the table loads so I dont know what triggers it.
I dont know script.

If I have the cam settings can I just paste the script at tue beginning of each table script.
So they are all the same.
Fast and easy?
I thought that with "custom camera" you could solve what you ask.
 
have not tried. my father is in hospital, very bad heart.
I'm very sorry friend, the right words to comfort are hard to find, I hope your father gets better.
 
i know how to change the camera view.

i want it to show a table like TPA and PB fx
try indy enhanced edition, it does it at the beginning
 
I think what you are wanting is the Camera Animation. After you start playing a table, open the BAM menu and arrow down to "DEV Options" then arrow down to "Desktop Camera Animation". It has been a while since I used it. You can create steps to move the camera. Unfortunately, I don't remember how to set it up. @Gimli probably remembers how to do it or if Indy has it, you can probably imitate the steps on other tables. ...Or if I remember correctly, you might be able to save the animation to other tables.
 
i know how to change the camera view.

i want it to show a table like TPA and PB fx
try indy enhanced edition, it does it at the beginning
I did the code I will have a look a give you a generic to use on any table....
 
Here is the a generic table see code at top of script which is this:

Code:
''''''''''''''''''''''''''''''''''''''''''Camera Settings'''''''''''''''''''''''''''''''''''''''''''''''''
xBAM.Camera.RequestForControl True

If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if

'Desktop Camera sequence for Panning
xBAM.Camera.DesktopSequenceBegin 10
xBAM.Camera.DesktopSequenceAddEntry -725, 1869, 928.6, 690.1, -22.6, 110.6, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 1275, 1869, 916.7, 220.3, -114.6, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 344.8, 1869, 1068.6, 297.9, -371.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 372.8, 1800.8, 948.8, 352.8, -102.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 192.6, 558.3, 0, 50, 8000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 10000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 3000
xBAM.Camera.DesktopSequenceAddEntry 275, 1421.5, 450, 275, 434, 0, 50, 3000
xBAM.Camera.DesktopSequenceEnd
xBAM.Camera.DesktopSequencePlay 10


'Cabinet Camera sequence for Panning
xBAM.Camera.CabinetSequenceBegin 11
xBAM.Camera.CabinetSequenceAddEntry 0, 0, 0, 1, 1, 1, 0, 0, 0, 5000
xBAM.Camera.CabinetSequenceAddEntry 0, 1200, -500, 2, 2, 1.1, 20, -0, 0, 10000
xBAM.Camera.CabinetSequenceAddEntry -1700, 800, -600, 2, 2, 1.1, 20, 0, -70, 10000
xBAM.Camera.CabinetSequenceAddEntry 1700, 800, -600, 2, 2, 1.1, 20, -0, 70, 10000
xBAM.Camera.CabinetSequenceEnd



xBAM.Camera.CabinetSequencePlay 11



xBAM.Camera.DesktopSequencePlay 10

''''''''''''''''''''''''''''''''''''''''''''

If you copy and paste into any table it should work for both desktop and cabinet mode.
Although cabinet mode is a little trickier as each person has a different sized cabinet...

xBAM.Camera.RequestForControl True removes the permission request


if you press "M" it will stop the pan and "b" will start it again.

Code:
Sub FuturePinball_KeyPressed(ByVal KeyCode)

    if keycode = 48 then xBAM.Camera.DesktopSequencePlay 10:xBAM.Camera.CabinetSequencePlay 11
    if keycode = 50 then xBAM.Camera.DesktopRelease:xBAM.Camera.CabinetRelease
 
End Sub

Cheers

Bob
 

Attachments

Last edited:
@hellrzr2k1
I have a tutorial that explains how I got these values. See Section on Desktop camera animation

 
Here is the a generic table see code at top of script which is this:

Code:
''''''''''''''''''''''''''''''''''''''''''Camera Settings'''''''''''''''''''''''''''''''''''''''''''''''''
xBAM.Camera.RequestForControl True

If xBAM.Camera.ScriptControl = FALSE Then
xBAM.Camera.RequestForControl
End if

'Desktop Camera sequence for Panning
xBAM.Camera.DesktopSequenceBegin 10
xBAM.Camera.DesktopSequenceAddEntry -725, 1869, 928.6, 690.1, -22.6, 110.6, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 1275, 1869, 916.7, 220.3, -114.6, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 344.8, 1869, 1068.6, 297.9, -371.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 372.8, 1800.8, 948.8, 352.8, -102.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 192.6, 558.3, 0, 50, 8000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 10000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 3000
xBAM.Camera.DesktopSequenceAddEntry 275, 1421.5, 450, 275, 434, 0, 50, 3000
xBAM.Camera.DesktopSequenceEnd
xBAM.Camera.DesktopSequencePlay 10


'Cabinet Camera sequence for Panning
xBAM.Camera.CabinetSequenceBegin 11
xBAM.Camera.CabinetSequenceAddEntry 0, 0, 0, 1, 1, 1, 0, 0, 0, 5000
xBAM.Camera.CabinetSequenceAddEntry 0, 1200, -500, 2, 2, 1.1, 20, -0, 0, 10000
xBAM.Camera.CabinetSequenceAddEntry -1700, 800, -600, 2, 2, 1.1, 20, 0, -70, 10000
xBAM.Camera.CabinetSequenceAddEntry 1700, 800, -600, 2, 2, 1.1, 20, -0, 70, 10000
xBAM.Camera.CabinetSequenceEnd



xBAM.Camera.CabinetSequencePlay 11



xBAM.Camera.DesktopSequencePlay 10

''''''''''''''''''''''''''''''''''''''''''''

If you copy and paste into any table it should work for both desktop and cabinet mode.
Although cabinet mode is a little trickier as each person has a different sized cabinet...

xBAM.Camera.RequestForControl True removes the permission request


if you press "M" it will stop the pan and "b" will start it again.

Code:
Sub FuturePinball_KeyPressed(ByVal KeyCode)

    if keycode = 48 then xBAM.Camera.DesktopSequencePlay 10:xBAM.Camera.CabinetSequencePlay 11
    if keycode = 50 then xBAM.Camera.DesktopRelease:xBAM.Camera.CabinetRelease
 
End Sub

Cheers

Bob
AWESOME , thank you very much. I tried using the indi code, but couldnt figure out what was triggering the anim
 
AWESOME , thank you very much. I tried using the indi code, but couldnt figure out what was triggering the anim
Works like a charm. a bit farther away than expected, but Ill tinker with the values when I get time.
Bam dev camera mode doesnt function properly for me, not sure why. It did at one time.
because Ive been away from FP for a while.
 
where does the script for the keyboard routing go.
i tried before and after and it doesnt work
 
i feel stupid now..
thanks, you saved me an hour messing around.
 
@hellrzr2k1
I have a tutorial that explains how I got these values. See Section on Desktop camera animation

Thanks for the guide btw, Im getting better at this (i think)
managed to get my auto view working.. can to use xbam.camera x,y,z, etc.... but its better than hitting a button everytime you get multiball on single screen scroll mode 1
 
TUTORIAL Script for table camera panning (animated 3d view of full table and playfield)


' *********************************************************************
' ** **
' ** Future Pinball Full Table and Playfield Camera Panning
' ** Thanks to Gimli and Slamt1lt
' ** **
' *********************************************************************

Option Explicit
xBAM.CreateAllExt

' *********************************************************************
' *** DELETE THE 3 LINES BELOW IF YOU HAVE A PINCAB OR HATE THE
' ***DENY / ALLOW POP UP THAT APPEARS WHEN THE TABLE IS LOADED
' *********************************************************************

If (xBAM.Camera.ScriptControl = FALSE) Then
xBAM.Camera.RequestForControl
End If
'************************************************************************
' ** Camera Panning Animation Sequence **
'************************************************************************
xBAM.Camera.DesktopSequenceBegin 10
xBAM.Camera.DesktopSequenceAddEntry -725, 1869, 928.6, 490.1, -22.6, 110.6, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 1275, 1869, 916.7, 220.3, -114.6, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 344.8, 1869, 1068.6, 297.9, -371.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 372.8, 1800.8, 948.8, 352.8, -102.1, 0, 50, 7000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 192.6, 558.3, 0, 50, 8000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 10000
xBAM.Camera.DesktopSequenceAddEntry 199.4, 1116.7, 434.8, 183.7, 617.2, 449.6, 50, 3000
xBAM.Camera.DesktopSequenceAddEntry 275, 1421.5, 450, 275, 434, 0, 50, 3000
xBAM.Camera.DesktopSequenceEnd
xBAM.Camera.DesktopSequencePlay 10


'Cabinet Camera sequence for Panning
xBAM.Camera.CabinetSequenceBegin 11
xBAM.Camera.CabinetSequenceAddEntry 0, 0, 0, 1, 1, 1, 0, 0, 0, 5000
xBAM.Camera.CabinetSequenceAddEntry 0, 1200, -500, 2, 2, 1.1, 20, -0, 0, 10000
xBAM.Camera.CabinetSequenceAddEntry -1700, 800, -600, 2, 2, 1.1, 20, 0, -70, 10000
xBAM.Camera.CabinetSequenceAddEntry 1700, 800, -600, 2, 2, 1.1, 20, -0, 70, 10000
xBAM.Camera.CabinetSequenceEnd

' *************************************************************************************
' ** Future Pinball Defined Script Events
' ** put the below code where all the keyboard definitions are in the table script ' **************************************************************************************

Sub FuturePinball_KeyPressed(ByVal KeyCode)

' ** Keycode 48 = B key if pressed show camera panning

if keycode = 48 then xBAM.Camera.DesktopSequencePlay 10:xBAM.Camera.CabinetSequencePlay 11

' ** Keycode 32 = D key, if D key (or Plunger is pressed will also stop camera panning)

if keycode = 32 then xBAM.Camera.DesktopRelease:xBAM.Camera.CabinetRelease
If (KeyCode = GetKeyCode(plungerkey)) Then xBAM.Camera.DesktopRelease:xBAM.Camera.CabinetRelease
End if
END SUB
 
Last edited:
Just to make sure it is clear:
' ***DENY / ALLOW POP UP THAT APPEARS WHEN THE TABLE IS LOADED

You won't be asked to DENY/ALLOW the camera control if you use:
xBAM.Camera.RequestForControl True
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Chat Bot Mibs Chat Bot Mibs:
    knaxit has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    dw1 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    allamain has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    johnny4545 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    mranderson has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    PinballFan1984 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Darkchylde has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Jeff X has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    SireB has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    francisghost has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    grumpycat has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    KingKongs has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Marthani has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    sandrosws has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    GUNSMOKE has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    lshjs has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Printz has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    id11179 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Thalamus has left the room.
  • AI Bot @ AI Bot:
    @, To remove or disable Two-Factor Authentication (2FA) from an account, you'll typically need to go through the platform where you've enabled 2FA. Here's a general guide:

    ### Steps to Remove Two-Factor Authentication (2FA):

    1. **Log in to your account** on the service (e.g., Google, Facebook, Apple, etc.).
    2. **Go to the Security or Account Settings** section.
    3. Find the **Two-Factor Authentication (2FA)** or **Two-Step Verification** option.
    4. Select **Disable**, **Turn Off**, or remove the 2FA method(s).
    5. You may be required to **enter a verification code** or **confirm your password**.

    ---

    ### If You Don't Have Access to Your 2FA Method:
    If you lost access to your 2FA device (like a phone or authenticator app):

    - Look for an option like **"Can't access your 2FA?”**, **“Need help?”**, or **"Account recovery"** on the login screen.
    - Contact the platform’s **customer support** for help.
    - You may need to verify your identity by answering security questions or providing ID.

    ---

    If you tell me which service or platform you want to remove 2FA from (e.g., Google, Facebook, Instagram, etc.), I can give you more specific instructions.
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    Guest pinball nirvana has joined the room.
  • P (Guest) pinball nirvana:
    how can I remove my 2factor
    Quote
  • P (Guest) pinball nirvana:
    remove my 2FA
    Quote
  • P (Guest) pinball nirvana:
    hi
    Quote
  • P (Guest) pinball nirvana:
    how to remove my 2factor from pinball nirvana
    Quote
      P (Guest) pinball nirvana: how to remove my 2factor from pinball nirvana
      Back
      Top