- Home /
Object Texture Showing Blur In Game
Hi
I am creating 2d game with unity. My player are moving on y direction & some obstacle are coming from opposite direction.The problem is when user are moving some blur effect are showing on obstacle.Please suggest me how can i remove it.
I have also fallow this link but non of them are giving solution for it.
I am Writing Player Movement script :-
private MainScript mainScript;
public float speedupward = 0.10f;
// Script Created by Sonu Odesi...
// Use this for initialization
void Start () {
mainScript = GameObject.Find("GameManager").GetComponent<MainScript>();
}
// Update is called once per frame
void Update () {
if(mainScript.gameState==GameState.GameRunning){
transform.Translate(Vector3.up* speedupward * Time.smoothDeltaTime);
}
}
Camera Movement Script:-
private bool followPlayer;
private bool followRocket;
private GameObject _player;
private GameObject rocket;
private Transform myTransform;
private float cameraPosition;
private GameObject _MyPlayer;
// Use this for initialization
void Start () {
_player=GameObject.FindGameObjectWithTag("KidPlayer");
_MyPlayer = _player.transform.root.gameObject;
myTransform = this.transform;
Application.targetFrameRate=60;
}
// Update is called once per frame
void LateUpdate () {
if(_player.rigidbody.isKinematic && followPlayer){
ScoreManagerScript.startScore = true;
myTransform.parent = _MyPlayer.transform;
}
if(followRocket){
myTransform.position = new Vector3(myTransform.position.x,_player.transform.root.transform.FindChild("PowerBoosterParent").transform.position.y+7,myTransform.position.z);
}
}
public bool FollowPlayer{
set{followPlayer = value;}
get{return followPlayer;}
}
public void FollowRocket(GameObject go,bool follow){
rocket = go;
followRocket = follow;
}
http://answers.unity3d.com/questions/419202/2d-object-gets-blurry-when-moving.html
$$anonymous$$y guess: this is an issue with the camera movement script. If you have a camera movement scirpt, post it so that folks on the list can take a look.
Organized for lack of headache.
public class CameraScript : $$anonymous$$onoBehaviour
{
private bool followPlayer;
private bool followRocket;
private GameObject _player;
private GameObject rocket;
private Transform myTransform;
private float cameraPosition;
private GameObject _$$anonymous$$yPlayer;
void Start()
{
_player=GameObject.FindGameObjectWithTag("$$anonymous$$idPlayer");
_$$anonymous$$yPlayer = _player.transform.root.gameObject; myTransform = this.transform; Application.targetFrameRate=60;
}
void Update()
{
if(_player.rigidbody.is$$anonymous$$inematic && followPlayer)
{
Score$$anonymous$$anagerScript.startScore = true;
myTransform.parent = _$$anonymous$$yPlayer.transform;
}
if(followRocket)
myTransform.position = new Vector3(myTransform.position.x,_player.transform.root.transform.FindChild("PowerBoosterParent").transform.position.y+7,myTransform.position.z);
}
public bool FollowPlayer
{
set
{
followPlayer = value;
}
get
{
return followPlayer;
}
}
public void FollowRocket(GameObject go, bool follow)
{
rocket = go;
followRocket = follow;
}
}
You posted your code as a 'comment'. You need to use the 101/010 button to format code. I "fixed" it, but the formatting is still impossible to read. I suggest you edit the question, delete the current code, paste in your code and use the 101/010 button to get this fixed.
As for your problem, 90% of all jitter issues posted to this list are solved by moving camera movement code from Update() to LateUpdate(). I don't know if that is your issue since I did not read the code.
H Robert
Sorry for not well formated code .I am trying y ou suggestion give me a 5 $$anonymous$$.
Answer by HanClinto · Oct 03, 2013 at 06:46 PM
The blurring in your picture is a photograph -- subject to long exposures that will blend multiple actual frames together (similar to the human eye). This is nice for showing the perceived effect, but I'm not sure that Unity is actually causing this blurring. Does this blurring show up when you take a screen shot on the actual device itself? If not, then I suspect that the problem is due to ghosting of the LCD -- slow image response and whatnot.
Hey I am testing on Ipad 3 .Is you think it is slow image response ??
Your answer
Follow this Question
Related Questions
Blur / healing brush effect on specific area of a 2D texture 0 Answers
Select part of the texture in GUI.DrawTexture 2 Answers
Paint Grid Texture 1 Answer
in game - how to partly invisible an object ? 2 Answers
Animating a Texture2D using cells 1 Answer