split screen after using _IrrSetActiveCamera
split screen after using _IrrSetActiveCamera
hello
i'm coding a game in autoit3 which is going to be split screen 2player game
but i can't figure out how to change from the menu camera (the main menu is in 3D and uses _IrrGetCollisionNodeFromCamera to read which menu button is pressed) to the player cameras in split screen
any help will be appreciated, thanks in advance
i'm coding a game in autoit3 which is going to be split screen 2player game
but i can't figure out how to change from the menu camera (the main menu is in 3D and uses _IrrGetCollisionNodeFromCamera to read which menu button is pressed) to the player cameras in split screen
any help will be appreciated, thanks in advance
Re: split screen after using _IrrSetActiveCamera
Use 2 cameras and change the active one when you are in menu/game.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: split screen after using _IrrSetActiveCamera
the problem is that when i start it it sets the active camera to the one in the menu and then i can't set both player cameras as active
Re: split screen after using _IrrSetActiveCamera
Sorry, not sure about what is the problem. Splitscreen already uses several cameras - one for each screen. Each one is set active before rendering it's part of the screen. You can also replace all those by a menu-camera. Or is the problem the input? I mean there is obviously only one mouse-cursor (as most computers these days have only one mouse), so moving that independent in 4 menues won't be easy to solve.
Try to describe your problem more detailed, so far I don't really get where you are stuck.
Try to describe your problem more detailed, so far I don't really get where you are stuck.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: split screen after using _IrrSetActiveCamera
ok so first of all i create three cameras
then i set the menu ($camrea[0]) as active
my question is how to make the other two work as split screen after i click "Play"
for now i'm using this row
but it sets player1's camera as active
Code: Select all
$camera[2] = -10 ;posx
$camera[3] = 0 ;posy
$camera[4] = 50 ;posz
$camera[5] = 0 ;tarposx
$camera[6] = 0 ;tarposy
$camera[7] = 0 ;tarposz
$p1cam[2] = -10 ;posx
$p1cam[3] = 100 ;posy
$p1cam[4] = 60 ;posz
$p1cam[5] = 0 ;tarposx
$p1cam[6] = 100 ;tarposy
$p1cam[7] = 0 ;tarposz
$p2cam[2] = -10 ;posx
$p2cam[3] = 100 ;posy
$p2cam[4] = 60 ;posz
$p2cam[5] = 0 ;tarposx
$p2cam[6] = 100 ;tarposy
$p2cam[7] = 0 ;tarposz
$Camera[0] = _IrrAddCamera($camera[2], $camera[3], $camera[4], $camera[5], $camera[6], $camera[7])
$p1cam[0] = _IrrAddCamera($p1cam[2], $p1cam[3], $p1cam[4], $p1cam[5], $p1cam[6], $p1cam[7])
$p2cam[0] = _IrrAddCamera($p2cam[2], $p2cam[3], $p2cam[4], $p2cam[5], $p2cam[6], $p2cam[7])my question is how to make the other two work as split screen after i click "Play"
for now i'm using this row
Code: Select all
_IrrSetActiveCamera($p1cam[0]); & $p2cam[0])Re: split screen after using _IrrSetActiveCamera
Ow ... just seeing now you mentioned autoit3. I fear I can't be of much help there as I know neither that language nor did I knew about that Irrlicht wrapper.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: split screen after using _IrrSetActiveCamera
so that means i have to improvise some creativity
anyway the autoit's language is (as my brother states, i never tryed to learn C++) similar to C++
also how come you didn't know about the wrapper? isn't it your creation?
anyway the autoit's language is (as my brother states, i never tryed to learn C++) similar to C++
also how come you didn't know about the wrapper? isn't it your creation?
-
hybrid
- Admin
- Posts: 14144
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: split screen after using _IrrSetActiveCamera
No, we don't provide any wrappers on our own. All the wrappers are community projects, and thus not necessarily known to us. Especially if the wrapped language is of the more exotic ones. So it might be that some support is simply lacking here.
Re: split screen after using _IrrSetActiveCamera
ok i found where i'm doing it wrong
*i still don't understand how i didn't notice in the begining*
in the example it's calculating the frames like this
so that half the screen is shown by one camera and the other by the other
also sorry to bother you
*i still don't understand how i didn't notice in the begining*
in the example it's calculating the frames like this
Code: Select all
_IrrBeginScene( 240, 255, 255 )
; draw the scene on the left
_IrrSetActiveCamera( $FirstCamera )
_IrrSetViewPort( 0,0,400,600 )
_IrrDrawScene()
; draw the scene on the left
_IrrSetActiveCamera( $SecondCamera )
_IrrSetViewPort( 400,0,800,600 )
_IrrDrawScene()
; set the viewport back to the whole screen
_IrrSetViewPort( 0,0, 800,600 )also sorry to bother you
_IrrGetCameraOrientation
once more i'm saying sorry to bother and bring this thread back but i hope i can find some help here about the return values of IrrGetCameraOrientation.
if the autoit wrapper doesn't change it much you should be able to tell me what it returns and how to use it (hopefully display it as degrees)
thanks in advance
if the autoit wrapper doesn't change it much you should be able to tell me what it returns and how to use it (hopefully display it as degrees)
thanks in advance
Re: _IrrGetCameraOrientation
I can't really help you, but I was wondering, why do you program something like this in a language like that?
Does it have any sort of advantage for you, over just using irrlicht with c++ ?
Does it have any sort of advantage for you, over just using irrlicht with c++ ?
Working on game: Marrbles (Currently stopped).
Re: _IrrGetCameraOrientation
the advantage (at least for me) is that autoit's help if complete and is easier for me to program in it than c++ (which i'm still trying to learn)
anyway can someone tell me how to use this function's return values or it's used only in the wrapper?
anyway can someone tell me how to use this function's return values or it's used only in the wrapper?
Re: _IrrGetCameraOrientation
Looking at the documentation:kokoilie wrote:anyway can someone tell me how to use this function's return values or it's used only in the wrapper?
Code: Select all
_IrrGetCameraOrientation($h_Camera, ByRef $a_Vector1, ByRef $a_Vector2, ByRef $a_Vector3)Code: Select all
Dim $forward, $upward, $sideways, $ret
$ret = _IrrGetCameraOrientation($myCamera, $forward, $upward, $sideways)
EDIT:
There's example in documentation how to use this function ._.
Working on game: Marrbles (Currently stopped).