Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 3 4 ] Page 2 of 4 |
|
|||||
|
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. |
||||
|
Note: you'll have to select the camera from the scenegraph first. |
||||
|
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. |
||||
|
@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 |
||||
|
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 |
||||
|
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? |
||||
|
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.... |
||||
|
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? |
||||
|
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. |
||||
|
Note: the behavior I sent you needs to be on the mesh node you want to move. |
||||
|
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 |
||||
|
[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. |
||||
|
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. |
||||
|
This is how I have the camera: |
||||
|
This how it looks like with the camera above the cubeMesh1 and in the -z direction: |
[ 1 2 3 4 ] Page 2 of 4 |
|