Unity Input System Problem

Hi everyone, so I want to create a Laser Defender game but during Unity Input System lecture, I got a problem where the circle shape with thunder logo are not moving at the same position with the player. I do follow from A to Z during that section and I happen to see a different which I send below:

(The min and max bound will follow the thunder logo and not the player)

(In Input System Package, I got a different option from the lecture where it said " Focus change behavior only be changed if “Run in Background” is enabled in Player setting")

Is there any method to solve this issues?

Hi Kluger,

Does the player move as expected? If so, the position of the icon is more or less irrelevant.

Which version of Unity do you use? Maybe there is a bug in your version.

1 Like

Hi Nina,

Sorry for the late reply.

Yes, the player did move (in term of speed) but the position are not the same with the thunder logo so the image of player will go outside of the boundary that are set(minbound and maxbound). I send the attachment below and my unity version

Unity version

Thank you for the screenshot. I’m wondering if the issue might be caused by the structure of the Player game object. As it seems, there is at least one child. To which game object(s) did you attach the player input script and your own script?

What position does the child have? The position in the Inspector is always relative to the parent. There could be a large offset between parent and child(ren). That could explain the offset between the icon and the player’s sprite. The icon seems to move within the boundaries. At least it looks this way in both screenshots of the scene view.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms