Add Four-Point Perspective Warping To 2D Sprites In Godot
Draggable corner handles, carousel drivers, and SubViewport input forwarding.
If you want to give a 2D piece of paper some depth, create a point-and-click game with pseudo-3D elements, or just play around with 2D perspective effects, Perspective Quads by BunkWire2X8 could come in handy. It's a collection of specialized nodes that let you apply four-point perspective warping to 2D sprites.
PerspectiveQuad2D is a Node2D that lets you apply four-point perspective warping to a Texture2D, so you can place it across four custom corner points. PerspectiveQuadShape is a resource you can use with PerspectiveQuad2D to blend between different shapes and modulations.
Carousel2D provides a shared view position that other nodes can listen to. This lets you control PerspectiveQuad2Ds and CarouselAnchor2Ds together and create 2D scenes with pseudo-3D effects. CarouselAnchor2D uses the Carousel2D's view position to interpolate between different keyframe transforms. You can edit the keyframes right in the inspector, and the node is useful for positioning other elements that aren't PerspectiveQuad2Ds.
Lastly, PerspectiveViewportContainer2D works similarly to a SubViewportContainer, but adds perspective warping. It displays the contents of a child SubViewport with the perspective effect and also forwards input to it.
To use Perspective Quads, you'll need Godot 4.6 or later. The add-on has some limitations, which you can check out on its Asset Store page.
If Godot is your game engine of choice, we've also shared some cool guides recently, including Calin P's look at authentic PlayStation 1-style rendering and Emil J's tutorial series on creating water:
Don't forget to subscribe to our Newsletter, join our 80 Level Talent platform, Discord, and follow us on Twitter, LinkedIn, Telegram, and Instagram, where we share breakdowns, the latest news, awesome artworks, and more.
Are you a fan of what we do here at 80 Level? Then make sure to set us as a Preferred Source on Google to see more of our content in your feed.
Keep reading
You may find these articles interesting
Godot To Stop Accepting AI-Generated Code Contributions
Godot Tutorial: Build 3D Dungeon Crawler In 20 Hours
Master Godot 4 For Free With Over 50 Hours Of Game Development Courses
Create Your Own 2D Arcade Soccer Game In Godot With This Free 12-Hour Course
Godot 4.8 Development Is In Full Swing
Learn GDScript From Zero Course Gets a Major Update
Check Out This Free Collection of Vector Graphics for Godot & Unity