Ambiera Forum

Discussions, Help and Support.

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

Guest
Guest
Quote
2023-03-22 17:15:12

Go up top to View > Add viewport > From Camera in Scene... and click the screen that pops up and use your mouse buttons to position the camera how you like it.


Guest
Guest
Quote
2023-03-22 17:17:55

Note: you'll have to select the camera from the scenegraph first.


admiralsmith
Registered User
Quote
2023-03-22 18:11:17

Guest wrote:
Go up top to View > Add viewport > From Camera in Scene... and click the screen that pops up and use your mouse buttons to position the camera how you like it.


There was no screen that popped up. What happened was it game me an option to select what I wanted the camera to be attached to so I select the test sphere but after that nothing happened.

So I repeated the process and started the program and it allowed me to freely move the camera with my mouse, however, I wasn't able to do anything.

But if I pressed the keys to move the object moves and the camera auto pans to the side for some reason as if its tracking some thats not there.


hadoken
Guest
Quote
2023-03-22 18:21:06

@admiralsmith

"However, I have it set to follow behind the target, however to doesn't seem to do so.
It behaves more like a cinematic camera than the camera I need."

do this simple trick: copy position values of object to follow to camera position, then set camera slightly backwards in -z direction plus a bit up in positive y direction


admiralsmith
Registered User
Quote
2023-03-22 18:39:40

hadoken wrote:
@admiralsmith
do this simple trick: copy position values of object to follow to camera position, then set camera slightly backwards in -z direction plus a bit up in positive y direction


It wont let ne copy the objects position


admiralsmith
Registered User
Quote
2023-03-22 18:42:20

Guest wrote:
Note: you'll have to select the camera from the scenegraph first.

Btw, Im getting an error when I try to move after I start the program.
"script. 10:ReferenceError: ccbGetSceneNodeProperty is not defined"

And its from the Move Position extention I added via one of the tutorial documents.
Could that be causing any of my issues?


Guest
Guest
Quote
2023-03-22 19:24:24

To copy properties in the editor like hadoken mentions you need to use ctrl + c to copy and then ctrl + v to paste. That error doesn't refer to my code because I don't call ccbGetSceneNodeProperty() on line 10 of my script. It must have something to do with something else. I will send you the project I have setup to test the code. Maybe that will help you.

https://files.catbox.moe/uo8rmz....


admiralsmith
Registered User
Quote
2023-03-22 20:12:31

Guest wrote:
To copy properties in the editor like hadoken mentions you need to use ctrl + c to copy and then ctrl + v to paste. That error doesn't refer to my code because I don't call ccbGetSceneNodeProperty() on line 10 of my script. It must have something to do with something else. I will send you the project I have setup to test the code. Maybe that will help you.

https://files.catbox.moe/uo8rmz....


I found where the error was and corrected it. It was in a Test.js one of the tutorials had me make.
But now its giving me another error:
"ReferenceError: sphere is not defined
Proper does not exist: Position"

Any idea what thats about?


Guest
Guest
Quote
2023-03-22 20:21:15

I don't use "sphere" in my code so I have no clue. Perhaps you have a behavior/action in your scene that requires you to attach a scenenode but you haven't.


Guest
Guest
Quote
2023-03-22 20:23:48

Note: the behavior I sent you needs to be on the mesh node you want to move.


admiralsmith
Registered User
Quote
2023-03-22 20:53:36

Guest wrote:
I don't use "sphere" in my code so I have no clue. Perhaps you have a behavior/action in your scene that requires you to attach a scenenode but you haven't.


I used "sphere" because cube was used in the tutorial I followed here:
https://www.ambiera.com/coppercube/doc/index.html


admiralsmith
Registered User
Quote
2023-03-25 02:05:03

[b]hadoken wrote:
do this simple trick: copy position values of object to follow to camera position, then set camera slightly backwards in -z direction plus a bit up in positive y direction


Unfortunately I have yet been able to fix my original issue.
Its as if the 3rd person camera option just doesn't work for me.


Guest
Guest
Quote
2023-03-25 03:34:05

My code was using the x-axis to move forward. Perhaps that is throwing you off. I changed the code to z-axis. Hadoken's post should work for you now. The 3rd person camera works on my end. If you could help us understand what isn't EXACTLY working, it would be appreciated. The 3rd person just follows the node, my script moves it like you requested. Remember to make sure you turn FollowSmoothingSpeed to 0 and perhaps uncheck CollideWithWorld.

Here's the script working along the z-axis:
https://files.catbox.moe/wcsn4e....

To set up the camera do as Hadoken's post reads.


Guest
Guest
Quote
2023-03-25 03:40:24

This is how I have the camera:

🔎︎



Guest
Guest
Quote
2023-03-25 03:44:32

This how it looks like with the camera above the cubeMesh1 and in the -z direction:

🔎︎



Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (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