hi, i am trying to make a platform game with similar shooter mechanics to the conviction of gun dude. I did manage to get the the gun to rotate towards the mouse, and i used the “set position to” action to snap it to the player, but, alas, it snaps only while not moving and while jumping and falling. When the player is walking the gun snaps to the player sprite origin(and yes i did move the origin to the right spot to try to fix this), and when player stops the PLAYER snaps to the middle of the gun, moving the player a fair amount. I even tried to lerp the gun to the player.
Hi, it would be very helpful for everyone in the forum to see your events.
ok i will do that as soon as i figure out how to take screenshots on windows 11
I have tried your events and it works as intended.
That’s actually not necessary. You can create a custom point for your gun at the player-sprite. Maybe you can try that and see if there is any difference?
ok let me give that a try.
I see. That’s very strange. As mentioned, for me everything works as it should. The only thing I can think of is maybe to delete your sprites and load them again into the editor and to set up a test scene only with the gun positioning events.
Ok, i will try that tomorrow, also i there is a possibility that this happens because i changed the origin of the gun, i will get back to the forum as soon as i have tried these
In this case I would start with the gun set up in the scene again and add successively the other events until the point when the problem occurs.
On a side note: you don’t need the ‘Always’-condition. As far as I know this is a remnant from older Gdevelop versions. An event block without condition is executed always anyway.



