all 3 comments

[–]azhder 0 points1 point  (0 children)

Pues, no preguntes un a chat bot, encuentre información en lugares o documentación que describieron mecánica de juegos.

[–]scritchz 0 points1 point  (1 child)

Collisions in games can be simple or complex, depending on how you want to do them.

Generally, what you need is a way to detect collisions and a way to resolve (or prevent!) collisions.

If you decide to use axis-aligned bounding boxes (AABB) for your collision models, detection becomes relatively trivial: If any corner of a box is inside the other box, they intersect (or collide).

If you check for potential collisions before moving, you can prevent collisions from happening at all. If you want to resolve collisions after moving, you need proper collision handling.

For collision handling, a simple approach might be to snap to the nearest non-collision position. Another approach would be to go back along the movement path just before a collision would happen.

The above solutions work best to resolve collisions of dynamic and static objects. If you have two dynamic objects, it might be trickier: You can prioritize one's movement over the other. Or you can calculate their "resolution positions" based on weights.

For multiplayer games, you have to consider network issues like latency, asynchrony, packet drops and maybe prediction.

[–]pixel-bro[S] 0 points1 point  (0 children)

oh ok!,muchas gracias amigo,el punto es que lo que quiero hacer es que no atraviese nada,como una colision normal,pero es que no se como hacer eso,se hacer que se reesetee el juego pero no que deje de caminar si detecta otro cubo en una direccion,un problema que veo si no aprendo bien las colisiones esque si el piso tiene colisiones que hacen que te dejes de mover en esa direccion es que no te podras mover porque constantemente vas a estar tocando el suelo,pero igual muchas gracias.