I did as you said. For sure it’s different kind of movement - it’s more like acceleration. Speed accumulates untill it touch wall, or I use reverse velocity. It doesn’t stops untouched (It doesn’t use gravity).
When player touch walls it get’s immediately stopped. (Except crazy speed modifier values like 10k But I can understand it just doesn’t see small walls with velocity like (200, 0, 200) )
void FixedMovePlayer()
{
float xValue = Input.GetAxis(“Horizontal”);
float zValue = Input.GetAxis(“Vertical”);
Vector3 velocity = new Vector3(xValue, 0f, zValue);
Debug.Log("Vector3: " + velocity.ToString() + "\nObject velocity: " + GetComponent().velocity.ToString());
GetComponent<Rigidbody>().AddRelativeForce(velocity * Time.deltaTime * moveSpeed);
}
I suppose there is no point in clearing this, probably Rick will make it better way during the course, isn’t he?
Going back to the initial version:
Is there any way to fix this using Translate?
I can understand it could skip walls with big speed values, but these are like: speedX: 0,008698 speedZ: -0,008698 per update.
It makes throught the wall with scale (1,1, 21) - tried experimenting with bigger scale, player was able to get inside the wall.
I tried experimenting with wall’s Box Collision size from 1,1,1 to 2,1,2 and it still didn’t matter.
Or is it just “known issue” and it’s not recommended way?