Forum rules - please read before posting.

2d character in 3d mode unity

Hi, I have been struggling with this for quite some time now. I am new to adventure creator
My game is point and click adventure.

I cannot figure how to turn my 2d sprite just left and right instantly without unity showing that it is turning. (because if unity is showing, at some point when turning, my character is as thin as a paper)

And whenever I assign my prefab to the sprite child parameter when I use the animation engine 'Sprites Unity Complex'.
it gives me error. something to do with the 'rotate sprites to' in the mecanim parameter section in the inspector.

this the link of screenshots: https://imgur.com/a/w36BaKx

also I have noticed that when I play the game, and after some clicking, my fps continuously drops bit by bit.
What seems to be causing the problem?

Thank You

Comments

  • Okay for the sprite rotation, I just use additional script. So it is okay now.
    So the main problem now is fps drops that I found out from the GameEngine itself.

  • Welcome to the community, @brianeleven. What are your AC and Unity versions?

    You shouldn't need to rely on an additional script to have your character's rotate instantly - setting a negative "Turn speed" value should cause instant rotation.

    If you're getting this error while a "Sprite child" transform is assigned, the most likely cause is that there's no AC MainCamera present in the scene. Might this be the case? It should be generated automtically when using the Scene Manager to organise your scene objects.

    As for the FPS drop, we'll need to learn the results of a Deep Profile using Unity's Profiler window. That should point to the source of any processor spikes that would cause slowdown. Please also share details of the way your game/scene is set up, as well as what other assets you may be using.

  • Thank you. I am using unity 2019.4.12f1 and for the AC v1.73.8.

    Alright I will try that.

    Actually u might be correct, theres a warning log that says 'No MainCamera found - please click 'Organise room objects' in the Scene Manager to create one.' Even though I have created the camera through the scene manager by pressing 'create' button on the side of the default camera.
    Also the button called 'Organise room objects' is not there.

    So currently, my scene consists of quads and cubes with 2d sprites and materials, and some of the quads have normal maps attached to them as for backgrounds.
    For additional c# scripts, there are 2, which I use one for the player and another for day night cycle of the environment (this uses 3 directional light).

    I have tested the game with/without the ac game engine and leave it on play for some time. with the game engine active, the fps keeps dropping little by little (without me doing anything).

  • Even though I have created the camera through the scene manager by pressing 'create' button on the side of the default camera.

    AC uses GameCameras as reference for the MainCamera to use for position/rotation/FOV values. You can have multiple GameCameras in a scene, including the "Default Camera" you assign in the Scene Manager, but it's only the MainCamera that performs the actual rendering.

    Also the button called 'Organise room objects' is not there.

    Thanks for pointing this out - the button was renamed, I'll update the message. Instead, click the "Without folders" button to the top-right of the Scene Manager. That should bring back the MainCamera.

    I have tested the game with/without the ac game engine and leave it on play for some time. with the game engine active, the fps keeps dropping little by little (without me doing anything).

    Check that this is the case without either of your 2 C# scripts present, but we'll need the results of a Deep Profile to work out the source of the issue. I can't detect such a drop on my end by running a fresh AC scene.

  • Okay thank you sir. It seems your solution about the camera resolves my issue which is the fps drop. Previously I had only one camera in my scene generated through scene manager. Why? because I was confused why does the ac generated camera is turned off automatically after play.
    silly me.
    So, thank you very much for your answers and time!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.