I am trying to move a RigidBody2D’s z position.
void Player::SetZ(int z)
{
position.z_ = z;
playerNode->SetPosition(position);
}
But after I do, SetLinearVelocity() seems to force it back to 0. When I do not have SetLinearVelocity it keeps it’s z position. But if I do manual movement with something like position+=velocity collisions stop working
Anyone know how I could get around this?
Thanks