|Topic was automatically imported from the old Question2Answer platform.
Hey everyone! Beginner to gamedev in general over here.
I chose a shooting gallery asset pack at random and decided to make a tiny game with it.
I want to stretch, squash, and pivot the rifle to the position of a position2D node that is further down the hierarchy (which follows the mouse whenever a MouseMoveEvent is triggered), does anyone have any useful / relevant links that I might use?
Is the rifle a sprite? Do you intend to rotate the sprite around a fixed point? If so, you can use the
look_at() function (or some similar code) to move the sprite around. To squash and stretch the sprite, change the “size” property of the sprite’s image. Change the size with respect to how far/close the mouse is from the rifle. Use some ratio (such as the position of the mouse and the rifle image) to scale the sprite with the mouse.
Ertain | 2020-09-09 03:44
Thanks! I did end up changing the scale of the sprite in relation to the mouse position.
Lazarwolfe | 2020-09-09 18:55