I have created my own function for translate as
void Transform::Translate(sf::Vector2f deltaPosition)
{
Position.x+=deltaPosition.x;
Position.y+=deltaPosition.y;
positionMatrix.translate(deltaPosition);
}
but it doesnt work at time
From my physics class if I call this as
gravity = sf::vector2f(10,0)
transform->Translate(gravity)
it works
but if I call it as
position = gravity/mass*dt*dt;
transform->Translate(position);
it doesnt works
Any idea where I might be wrong ?
I have checked the values for delta position and I am getting proper values in there
but still the object is not moving