After running the code if I set the moveSpeed above 10 the player goes through the wall. Need to have a different call code. If I use :
void Start()
{
_td = Time.deltaTime * moveSpeed;
m_Rigidbody = GetComponent<Rigidbody>();
PrintInstructions();
}
void FixedUpdate()
{
MovePlayer();
}
void MovePlayer()
{
m_Rigidbody.velocity = transform.forward * -_td;
}
This will move the player without going through the wall at a faster speed but only one direction…how can I add to this for full controller/keyboard support?