I want to create a boundary on both side (Right and Left) of my game screen, so that the space ship doesn’t goes outside of the screen. How to do that… I am attaching my project…1373169–69303–$web.zip (502 KB)
Waiting for a reply.
I want to create a boundary on both side (Right and Left) of my game screen, so that the space ship doesn’t goes outside of the screen. How to do that… I am attaching my project…1373169–69303–$web.zip (502 KB)
Waiting for a reply.
I set a limit value for x and y. If my player goes beyond this limit, he is set to be at the limit. I do this by monitoring player position during input.
If you don’t want to code it you could also make 3d boundary objects that are just out of view, and detect the collision… then you would set it to a vector3 of the previous x and y but make the z the position right before it touches
I love the game, btw. It’s pretty fun
I don’t suggest using collision for boundaries it might mess up something. You should just check if X position less or greater than boundaries and if less then only apply movement.
But wouldn’t different Screen Resolutions also mess with the Game.
eg:
Using a Screen of Aspect Ratio of 4:3 be able to render a different view of the same Scene than a Screen of Aspect Ratio of 16:9.
I think in both the Conditions the problem is persistent.
Correct ME if I’m wrong.