I want to rotate my object by a given amount and translate it forward to create a steerable tank.
I couldn't find out how to do it, all the matrices, vectors, and quaternions make it difficult for me to find a solution.
This is the Unity equivalent of what i want to do:
transform.Rotate(0, 0, -turn_input * turnSpeed * Time.deltaTime);
transform.position += transform.forward * drive * speed * Time.deltaTime;
I used to use this code in Bevy 0.2.1 but it broke after updating to 0.4
*transform.value_mut() = *transform.value()
* Mat4::from_rotation_translation(
Quat::from_rotation_z(-turn_input * tank.turn_speed * time.delta_seconds),
Vec3::unit_y() * drive * tank.speed * time.delta_seconds,
);