I am a rookie and trying to make my first game using Unity3D. And i have a problem I don’t understand what better way to move green object in my field and when it goes in collision of another green object it will stuck or push it on one “step” in the direct u move. So i make that my green object(Player) are moving accros this square field and because i am using Transfrom.position x or y it step like a teleport and ignore other colliders. Can u help me with this question. Pls tell me what is better to use. Always check for colliders or use AddForce with rigidbody. Pls give me an example of code.
use either AddForce or change velocity of the rigidbody in FixedUpdate.
since you’re using a grid, with a little math you don’t even need collision. if you have a 5*5 array with two gameobjects in it which you can map to world coordinates, you always know if you try to move into an empty or filled cell.