- Home /
wasd movement rigidbody no bouncing
Hello all. I am trying to move cubes around with wasd keys in a 2D space. I move them by changing transform.position but I learnt that the cubes bounced a little when colliding, and I do not want that. Reading in various forums I found that using forces and raycasting was the way, but I have not been able to make it work. The up vector is Y, and the surface where the cube moves is parallel to it so that it faces the camera. Can someone point me in some direction? so I can make a simple wasd character controller so that physics detects collisions at time and stop the stuttering. the W and S direccions would be parallel to Y-axis and A D directions woud be parallel to the X-axis. Any help would be appreciated.
I should add that the cubes I want to collide with are created by code, are instances of a prefab. I hope this doesn't change much