Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Help with a simple ship project of mine

Registered User
2023-03-30 05:12:45

Guest wrote:
Two different camera behaviors can work so long as they do not conflict. Normally this means something like keys/buttons that are used by both. Last one overwrites, I believe. I meant only one camera can be active at a time, but now we have split screen in the JS API so that is technically not true now.

If you need to send your project then put your ccb file in a folder with whatever resources it uses and zip it. Don't send the exe as that is just extra mbs and lots of people have poor internet connections on here (myself being one).

About the error: it is noteworthy because learning to track down and manage errors is vital to game design and programming in general.

In the words of Warhammer 40k: "Suffer no error to live."

Here you go. I think its in the test.js file that I got from a tutorial.

Btw, I believe there may be another way as to what I described in my previous message:
Basically the "Model Viewer Camera" Behavior doesn't have the "FollowMode", "Object to follow", "Target Height" settings.
The possible fix is to make a custom version of this where those two parameters are added to it so it can potentially function as both and you could also add the other necessary settings Im looking for, such as locking it above the Y axis.

2023-03-30 08:09:52

Yeah I just looked it's certainly the test.js file. You've got a couple errors in that one. You need to use "==" in your if statement. You need to change "sphereMesh1" into the variable cube in the pos3d function var. ccbSetSceneProperty needs to be ccbSetSceneNodeProperty(cube, "Position", pos3d);.

Trying fixing those errors and seeing if that clears up your script or if it's not important just delete the contents of your test.js file.

Unfortunately the code from the editor behaviors and actions can't be accessed. It would have to be rewritten in JS. Basically you need a camera that points towards a pivot point in the ship and doesn't allow the camera to go below the sea. I'll check it out tomorrow.

Registered User
2023-03-31 03:16:51

That did in-fact fix the issue! Thanks for that.
Let me know if you find out anything.
Also, if you have any other smart guys who knows Javascript in CopperCube, then do link them this thread.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Internation?l" (you are not logged in)




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



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