GoPinball.com
http://gopinball.com/forum/

BAM - Camera contoled in script
http://gopinball.com/forum/viewtopic.php?f=86&t=6619
Page 2 of 3

Author:  franzleo [ Thu May 24, 2018 9:43 am ]
Post subject:  Re: BAM - Camera contoled in script

ravarcade wrote:
.......Request for user permission is mandatory.
I don't want to add "permissions" to BAM menu and i think, that user should be aware what will happend.
In future maybe i will add more "request for" things, so it is important to create "user friendly" interface for this...........


I can not program a new camera view, switching from visual request and having to answer Yes / No .... is not logical ...

Regards

Gianfranco

Author:  Gimli [ Sat Nov 17, 2018 6:38 pm ]
Post subject:  Re: BAM - Camera contoled in script

Hi Rav ,
Coding for Desktop Camera Mode works great Rav !

Will you be adding Coding for Cabinet and VR as well ?

I tried
Code:
If KeyCode >= 30 And KeyCode <= 33 And xBAM.Camera.ScriptControl = FALSE Then
      xBAM.Camera.RequestForControl
   End If

   If KeyCode = 30 Then
      xBAM.Camera.VRSet   232,   961.2,   373.8,     232,   694.2,       0,      80,     2000
   End If
   If KeyCode = 31 Then
      xBAM.Camera.VRSet   361.2,    1068,   480.6,     258,   640.8,       0,      60,     2000
   End If
   If KeyCode = 32 Then
      xBAM.Camera.VRSet     0,   854.4,   213.6,     258,   694.2,       0,      90,     2000
   End If
  If KeyCode = 33 Then
      xBAM.Camera.VRSet     0,   854.4,   213.6,     Bumper1.X, Bumper1.Y ,       0,      20,     1000
   End If
   If KeyCode = 34 Then
      xBAM.Camera.VRRelease 100
   End If


It doesn't seem to be implemented yet ?
Same with xBAM.Camera.CabinetSet ?

Thanks !

Author:  ravarcade [ Mon Nov 19, 2018 6:36 am ]
Post subject:  Re: BAM - Camera contoled in script

@Gimli: I will add for cabinet.
For VR i still have no idea how to make it right. Everything leads to "rollercoster" in VR.

Author:  Gimli [ Mon Nov 19, 2018 11:50 am ]
Post subject:  Re: BAM - Camera contoled in script

Thanks Rav !

Question 1:
With BAM Camera for desktop ( and cabinet) , will the final result of the coding look the same on every computer system/ monitor shape/size ? Will it be "centered" regardless of display ?
I am guessing it will look great on all set ups.

Question 2:
If I create an "animation seq" using the old "animation sequencer" for people Using VR.
Will that be the same for all VR users ?
I am guessing that the "animation seq" will vary between desktop/cabinet/VR, but if I create one for VR it will look ok for all VR users?

Also Question 3: Can you consider removing the mandatory permission screen ?. I don't think it is necessary. If people don't like it , they won't play the table and I plan on have a menu option to turn it on/off as desired.

I like the ability regardless of mode to be able to use cameras for pan around room. I like
appreciating the full table art and it gives an immersive experience ...

I agree that some/many people may find the camera panning is like a roller coaster.

I notice the TPA phone app always starts a table with camera panning and I quite like it...
https://youtu.be/6Lk9dJKlyqI

Author:  Gimli [ Mon Nov 19, 2018 12:59 pm ]
Post subject:  Re: BAM - Camera contoled in script

https://youtu.be/YTCPxYuXBlM


Another neat use of camera modes is to teach the rules :shock:

We can now easily do this for Monster Bash , especially because I can use the rules from the phone app

Author:  GeorgeH [ Mon Nov 19, 2018 1:29 pm ]
Post subject:  Re: BAM - Camera contoled in script

That is cool I have written rules for several tables but it would probably be better to add them to the table.

George

Author:  ravarcade [ Sun Nov 25, 2018 9:17 am ]
Post subject:  Re: BAM - Camera contoled in script

https:\\www.ravarcade.pl\beta\BAM.dll
v.242

In arcade mode (lets call it "cabient" mode) in DEV Options you will find "Cabinet Camera Animation".
It is in same place as "Desktop Camera Animation".

You have same options as in old "Animation Sequencer":
- table translation X/Y/Z
- table scale X/Y/Z
- table rotation X/Y/Z (X is same thing as table angle).
- delay

When you enter values press "Enter" to apply entered settings.
Ctrl-C to copy to clippboard:
Code:
  xBAM.Camera.CabinetSequenceBegin 10
    xBAM.Camera.CabinetSequenceAddEntry     100,       0,       0,       1,       1,       1,       0,       0,       0,    1000
  xBAM.Camera.CabinetSequenceEnd


If you press CTRL-C in lines "Play" , "Load" , "Save" it will copy all camera seqences for desktop and cabinet mode.

... more ... in script you can use commands:
xBAM.Camera.CabinetSet (same params as xBAM.Camera.CabinetSequenceAddEntry)
xBAM.Camera.CabinetRelease (same way as xBAM.Camera.DesktopRelease)
xBAM.Camera.DesktopSequencePlay seqenceId, loop (= true or false)

Author:  Gimli [ Sun Nov 25, 2018 9:40 am ]
Post subject:  Re: BAM - Camera contoled in script

Amazing Rav !!
I will give it a try later today
Thank you

Author:  Gimli [ Tue Nov 27, 2018 5:46 pm ]
Post subject:  Re: BAM - Camera contoled in script

Hi Rav,

I finally tried this feature and the pasted code seems to like the coordinates are switched or something.

I load the table in Desktop mode then enable 'forced arcade mode" and "Static" camera

I generated this sequence
Code:
  xBAM.Camera.CabinetSequenceBegin 10
    xBAM.Camera.CabinetSequenceAddEntry       0,       0,       0,       1,       1,       1,       0,       0,      45,    4000
    xBAM.Camera.CabinetSequenceAddEntry       0,       0,       0,       1,       1,       1,       0,      -0,     -45,    4000
    xBAM.Camera.CabinetSequenceAddEntry       0,       0,       0,       1,       1,       1,       0,       0,       0,    1000
  xBAM.Camera.CabinetSequenceEnd


and add this keycode to activate camera
Code:
if keycode = 48 then xBAM.Camera.CabinetSequencePlay 10


thanks !

Author:  Gimli [ Wed Nov 28, 2018 11:54 pm ]
Post subject:  Re: BAM - Camera contoled in script

The update works great !
Is there any chance of removing
the "request camera control" permission screen ?

Thanks Rav !

Page 2 of 3 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/