+1 vote

I'm making a game which is simillar to the Rush Hour puzzle game, I want to split a texture into some parts, and apply it to different textures.
My texture is on a 1:N ratio and I want to split it on N sprites.
for example, I have the car image below:
full car

As it is a 1:2 ratio, I want to apply it on 2 different sprites, as represented here:
enter image description here

I would like to do it all through the code as I want the user to be able to add their own car images, I've heard about atlas but I don't understand how can I use it only through code.

Godot version 3.2.1
in Engine by (27 points)
edited by

1 Answer

0 votes
Best answer

Yes, you can by using TextureAstlas
Tutorial: https://www.youtube.com/watch?v=oEBUXW674dc

by (117 points)
selected by

I'll add this video to my godot watchlist. Thank you for sharing!

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.