Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
ccbSplitScreen problem

sven
Registered User
Quote
2024-04-07 22:44:41

I was testing new split screen function but have problem getting it to work.
It does split the screen.. but realtime rendering shows up only on second camera..
first camera shows just a image ( doesnt show any movements that happens in game )




var s1 = ccbGetSceneNodeFromName("Cam1");
var s2 = ccbGetSceneNodeFromName("Cam2");

var p1=ccbGetScreenWidth()/2;
var p2=ccbGetScreenHeight()/2;

ccbSplitScreen(s1,10,10,p1-10,ccbGetScreenHeight()-10, s2,p1+10,10,ccbGetScreenWidth()-10,ccbGetScreenHeight()-10);




(in scene i have 2 cameras that points to same target " animated soldier model " first camera that should use first part of screen that is splitted -shows just a image .. nothing moves on screen (no animation of soldier or movement..- second camera that uses second part of screen works. )


SamGrady
Guest
Quote
2024-04-07 22:53:13

I can't say anything about split screen function (I'm not using it) but i find much better way for me, i use render on texture from two cameras.


sven
Registered User
Quote
2024-04-07 23:00:55

SamGrady wrote:
I can't say anything about split screen function (I'm not using it) but i find much better way for me, i use render on texture from two cameras.


i have had problems with render to texture also.. i used it for mirror and scope-but had to abandon this idea -objects "depth" was messed up on rendered image.

now i had idea to make multiplayer game with splitted screen but not working for me.


serge
Registered User
Quote
2024-04-08 01:12:23

Which script are you using @just_in_case or @hadoken?


serge
Registered User
Quote
2024-04-08 01:15:14

The movement will only work on one active camera. While other is non acive unless switch from camera to make other active. but it function on one active camera.


just_in_case
Moderator
Quote
2024-04-08 02:50:23

Hi there @sven, if you are using camera movements with inbuilt behaviors then they won't work in on splitted screen, you have to create a custom script for the movement controller of your camera, otherwsie it will remain at the same place.
Other thrn that, everything seems to work fine on my side. Did you tried the splitscreen extension that I created. Recently someone also created a VR extension using the same ccbSplitScreen() command. I will try to send you a demo project file that uses this command, let me know if that works for you or not to confirm if it is hardware related issue or a bug in the splitscreen command.


just_in_case
Moderator
Quote
2024-04-08 03:05:35

Ahh, I just got it, what issue might you be going through? Sorry, it was not mentioned in the documentation.

You need to put the code in an OnFrameEvent to make it animate for you. That's probably what you are facing, you are not using it on an OnFrameEvent, which is why you can only see still images and no animation.

I hope this will fix your issue of no animation, just put the code in an on-frame event. Internally it uses the same technique of RTT for multiple-screen just like @SamGrady suggested.


sven
Registered User
Quote
2024-04-08 08:40:34

Thanks just_in_case
Putting it into OnFrameEvent solved the problem.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact