|
how can i say to the player that don't get out of the screen(camera field of view)? my player and camera always are moving forward and when i controlling the player,it's get out of screen. The genre of game is top down plane shooter. My camera and player are moving forward with a constant speed. Also player can controll the character and move it. I want to say to player that dont get out of the screen. If i attach the character to camera,then if i move the character in axis of left and right,camera will move too. But i dont want to .also my game is not top down completely. It's a bit perspective. The script code for player is below: using Unit In other script i say to camera that move forward like player in default. The upper code is not good for my game. Because my game is perspective and upper's side of screen is my problem. I want a script that can recognize the field of view and force the player to move only inside the field of view.
(comments are locked)
|
|
Ok, Give the input to your ship as normal. In the same update check if the position is more or less than the camera position +/- the distance to the side of the screen. In the first line you intialized a variable in java. How can i write this code in c#?what's the variable type?
Aug 09 '12 at 08:54 AM
karafs
Aug 09 '12 at 08:57 AM
fafase
(comments are locked)
|

I wonder if it's possible to write an AI system that is better at formatted code on this forum than new users are at formatting code on this forum?