- Home /
adding force to a 2d object makes it teleport.
I am not sure if this is just because it is moving fast or if it is because it is actually teleporting. I tried lowering the gravity for the rigidbody and mass of it but that just changed how far it would "teleport". I am trying to make a more floaty kind of jump (think halo's jumping but for a 2d game) and obviously this doesn't look good in comparison to what I am going for. What could be the causes and the solutions for them? If any extra info is needed please just ask.
here is a video of it: https://youtu.be/3r4wbfqFxuQ it should be live soon
Answer by Guichaoua · Apr 16, 2017 at 08:10 PM
Try to use velocity instead of AddForce, this may work.
var v = rb.velocity;
v.y += transfrom.up * jumpForce * Time.deltaTime;
rb.velocity = v;
Your answer
Follow this Question
Related Questions
Rigidbody2D x velocity not moving unless placed in FixedUpdate 1 Answer
Adding force to rigidbody2d to slide 1 Answer
How do add force to the left (x-axis) 2 Answers
Problem with 2 Rigidbodies having respective colliders (2d) 1 Answer
Using direction and Rigidbody2D.AddForce() to move towards object. 1 Answer