I am trying to multiply the type "Vector2" by a scalar of delta and type float values. Information about the Vector2 type can be found here:
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/math/class-use/Vector2.html
In particular, on this page I refer to:
Vector2 --- Vector2.scl (floating scalar) Multiplies this vector by scalar
position is vector2 speed is vector2
I get an error: "The scl (float) method is undefined for type Vector2"
public void update(float delta) { position.add(velocity.cpy()).scl(delta); }
source share