Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3d Object Z(Elevation) position does not update to Preview when assigning 0(Zero) in the event editor. #5684

Open
1 task done
VanCastar opened this issue Sep 26, 2023 · 1 comment

Comments

@VanCastar
Copy link

Is there an existing issue for this?

Describe the bug

When you have a preview open and change the elevation of a 3d object and update, the elevation does not change in the preview if the elevation is set to zero.

Steps to reproduce

Make a 3d object
Place it on a project.
Set it's elevation to something else but 0 (Like 20).
Preview the game.
Change the elevation of the object in event editor.
Update the game preview.
The preview object does not go to zero.

Note: The elevations update works on all other elevations BUT the zero.

GDevelop platform

Desktop

GDevelop version

5.2.172

Platform info

Windows 11 Pro

Additional context

This is the car floating at 20 Elevation.
image

This is the car set to 0 elevation and updated.
The car is still at 20 elevation instead of 0 that is set.
image

Note: The update works on all other Elevations BUT the zero.

@AlexandreSi
Copy link
Collaborator

Hi @VanCastar,
thanks for reporting this bug!

This is due to:
https://github.com/4ian/GDevelop/blob/master/Core/GDCore/Project/InitialInstance.cpp#L111

This check was added to avoid writing "z": 0 in every instance (even the 2D ones) thus making the project file heavy.

I guess it will also happen for Rotation X and Rotation Y. I think there is something to do so that the 3D capability stores the Z to fix that. We'll have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants