hello I'm new to Godot and i was wondering how to set up player animations that use split sprites, i have separate sprites that are not on a sheet because they are irregularly shaped and it wont slice well. the character is split in the middle so that i can have him run and gun with the ability to aim in straight or diagonal, or just run. do i have to make multiple sprites and control them through script or two sprites with multiple animations for top and bottom. the problem I'm mainly having is the top half not always lining up with the bottom half, say i face left i manually move the sprites to line up, but when i flip the sprites to face right the top is out of alignment again. should i make each animation a separate animated sprite and control them in script or is it better to just have two, one for bottom and one for top, and line them up in code if the latter how do i do that? thank you in advance for your answers :)
need help using split sprites
This discussion was caught in the moderation queue since you have not confirmed your account yet.
Upon creating your account you should have received an account verification email. The confirmation email may have been incorrectly flagged as spam, so please also check your spam filter. Without confirming your account, future posts may also be caught in the moderation queue. You can resend a confirmation email when you log into your account if you cannot find the first verification email.
If you need any help, please let us know! You can find ways to contact forum staff on the Contact page. Thanks! :smile:
a year later
So you've sliced your sprite into a top half and a bottom half so that the top half can look at your mouse while the bottom half stays the same rotation?
# Make top half look towards mouse
$TopSprite.look_at(get_global_mouse_position())
# Flip sprite if facing left
if $TopSprite.rotation_degrees < 90 or $TopSprite.rotation_degrees > 180:
$TopSprite.flip_h = true
else:
$TopSprite.flip_h = false
Maybe something like this and then animate the bottom half using AnimatedSprite?