0 votes

When using camera.unproject_point(Vector3), you get the 2D coordinates in a Vector2, but I was wondering if there is a method that can be used to get what it's scaling value would be at that position.

in Engine by (5,232 points)

Yeah, though I would need objects to change scale. As the X and Y is not like a side scroller, but instead being laid out like a perspective plane. There seems to be several ways of doing this, and I'm just trying to figure out which is the best approach.

Do you have an example of what you want to achieve?

I suppose something like this: https://youtu.be/6sJFMyI3eZ0?t=54s

Though I haven't had much luck with 2D with dynamically changing the collision shapes. It's a bit fidgety. So I'd like to get the benefits of a 3D world cast into perspective against 2D background images. Only the objects in the main area will scale.

There are challenges though.

For doing this without scripting, I would have a 2D fullscreen image rendered before anything else (like a background), then a 3D scene on top of it, with colliders cleverly positionned. The character would be a 3D billobard.
But I never tested this before so no idea if it's the best way. You could ask the devs of LeftWay, eventually :)

Yeah it has interesting problems. I'd like to make a prototype of each idea and see which works the best. The one idea of taking 3D coordinates straight from the camera lacks a reasonable scalar. So I will put that aside for now and try some ideas using the viewport sprites.

The alignment shouldn't be too much of a problem, but when the screen scrolls all the objects might move in parallax against a sprite background that moves at a rate to match the character.

Thanks for the replies Zylann. X)

I might have to see if those devs will respond.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.