Camera Scripts, help and artist out

Hi Everyone,
I am using and abusing the Orbit camera from the this example.

https://playcanvas.com/editor/scene/527531

(it was from another orbit example scene, but can’t find that one for some reason)

Running into an issue where the camera throws errors and the controls aren’t showing when importing the scripts into another project.Assume it’s user error, I am an artist an not a coders :slight_smile:
My work aroundwas to import all the models into the orbit scene:

This is My fork:

https://playcanvas.com/project/484166/settings

I am not sure if I should keep forking projects from this or learn how to get that camera working in any project.

Thanks ahead of time
Mike K

I’ve looked at 2 of your scenes from your fork and not sure what issue I should be looking for?

What errors are you getting (exact wording or screen grab) and what do you mean by ‘controls’?

From my understanding you mean if you should continue forking projects or actually learn how to code it? Well, while you’re forking, slowly break down the code line by line and you’ll begin to understand it in my opinion.

Sorry, will try to make it more clear.

Here is the scene where it messed up.

https://playcanvas.com/editor/scene/527531

I cleared out the old scripts and only imported the scripts used in this working project / scene:

https://playcanvas.com/editor/scene/526675

Attached some images showing the differences and the errors I am getting.
The difference between them is I can access in the Forked orbit project, a bunch of setting when I select the camera, but the project where I copied the scripts (Via download) to, gives errors and the camera has no parameters I can access:

on the cameras

Could this be a feature request too, migrating an object / resource with it’s logic to another project?? That would be super helpful. Unity and Unreal both do this differently but it’s helpful for non coders.

So in the first image, it looks like you have created a project to use the Legacy Scripting system but you are using scripts from the ‘new’ scripting system which as you can imagine doesn’t work.

When you create a new project, make sure that the ‘Use Legacy Scripts’ is disabled unless you intentionally want to:

Unfortunately, there is no way for you to disable/enable the setting once the project has been created so you will have to create new project and reupload files again.

Thanks for the heads up, is there any way to get the same functionality in another project?
Is the new orbit project tutorials orbit camera compatible with the new editor?
Sorry to be a pain, I will check it out myself too :slight_smile:
Mike

Not 100% sure on what you mean here.

All the current tutorials from https://developer.playcanvas.com/en/tutorials/ are using the ‘new’ scripting system including the Orbit Camera examples: https://developer.playcanvas.com/en/tutorials/orbit-camera/

Or you can simply fork the project and work on the fork.

1 Like

Thanks, I think for me it’s forking the projects for now.
I grabbed the orbit camera scripts from the tutorial, but ran into the same problem transferring the scripts to the other project with the house.
I am guessing there is coding involved or a project settings I am not seeing. Will just keep forking from the same project until one of our coders can get in and take a look.
Mike

Why not do it the other way round?

Fork the Orbit Camera project and import the house models into that forked project?

If you fork the house project that has Legacy Scripts enabled, then the forked project will also have that enabled.

You need to EITHER create a brand new project with Legacy Scripts DISABLED and transfer all files to that project or fork the Orbit Camera project and import the house models into that project.

1 Like

I agree with you, sorry, didn’t make that clear, it’s what I did with the Orbits that I have already.
Was mostly wishing there was a way to not have to rebuild like I already have :slight_smile: