- Home /
stuttering motion 2d objects
hi, guys.I know anny question has already been here, but has not been able to solve this problem.
I am try: -fixedDeltaTime -smoothDeltaTime -deltaTime
use AddForce,Velocity,just tried to move the coordinates, and still I see stuttering when driving. interpolation included. FixedUpdate and Update - and still I see stuttering when driving. interpolation included.
I had already lost two days to find a solution, I was tired and did not know what to do
if(Rock1.transform.position.y > 28f)
Rock1.transform.position = new Vector2(Rock1.transform.position.x, Rock1.transform.position.y);
else if(Rock1.transform.position.x > 1f) {
Rock1.velocity = new Vector2(Rock1.velocity.x, speedUp * Time.fixedDeltaTime);
//Rock1.AddForce(Vector2.up * 220 * Time.fixedDeltaTime * 100);
//ban1 = false;
}
if(Rock4_1.transform.position.y > 43f && Rock4_2.transform.position.y > 43f) {
Rock4_1.transform.position = new Vector2(Rock4_1.transform.position.x, Rock4_1.transform.position.y);
Rock4_2.transform.position = new Vector2(Rock4_2.transform.position.x, Rock4_2.transform.position.y);
}
else if(Rock4_1.transform.position.x > -1f) {
Rock4_1.velocity = new Vector2(Rock4_1.velocity.x, speedUp * Time.fixedDeltaTime);
Rock4_2.velocity = new Vector2(Rock4_2.velocity.x, speedUp * Time.fixedDeltaTime);
//Rock4_1.AddForce(Vector2.up * 220 * Time.fixedDeltaTime);
//Rock4_2.AddForce(Vector2.up * 220 * Time.fixedDeltaTime);
// ban2 = false;
}
if(Rock2.transform.position.y > 35f)
Rock2.transform.position = new Vector2(Rock2.transform.position.x, Rock2.transform.position.y);
else if(Rock2.transform.position.x > -1f) {
Rock2.velocity = new Vector2(Rock2.velocity.x, speedUp * Time.fixedDeltaTime);
//Rock2.AddForce(Vector2.up * 220 * Time.fixedDeltaTime);
// ban3 = false;
}
anyone can help?
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to check if a 2D player collider is touching the ground/platform? 1 Answer
Trying to implement a parry mechanic 0 Answers
Enemy is moving opposite of the player 2D 1 Answer
How to postpone the action of the command | Translate | for a few seconds in Update? 2 Answers