Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

jitter on collision for 2 rigid bodies

private float speed = 5f;
private RigidBody2D body;

private void Awake()
{
	body = GetComponent<RigidBody2D>();
}

private void FixedUpdate()
{
	MoveObject();
}

void MoveObject()
{
	//write movement code here
    
    body.movePosition(new Vector2(for x movement, for y movement));
}
 
PREVIOUS NEXT
Tagged: #jitter #collision #rigid #bodies
ADD COMMENT
Topic
Name
8+3 =