Tag Info

Hot answers tagged


Magnets are kinda hard to simulate, but if you are looking solely for the effect of pulling and pushing objects you can use coulomb's law and simulate an electric field. Basically there are some points in the plane with an electric charge, which is either positive or negative. Since you are not aiming to do a physics simulation and for a game you are only ...


What you're really looking for are navigation meshes: These meshes will conform to the walkable areas in your game. You can make the nodes as small as you like. In this way, you can have far fewer nodes for your A* algorithm to work on. You can still have smaller nodes if you like for fine detail pathing, or you can use something like steering to get ...


You have to attach the wheeljoint2d to another sprite wich with a rigidbody2d for it to work. So yes, you should attach it to another rigidbody2d.


This article: http://www.ai-blog.net/archives/000152.html gives a good overview of Navigation meshes and discusses dealing with realtime modification of the mesh due to environmental changes at least a little bit... The basic idea is that you mesh out all the potentially walkable spaces by default, then either mod a section of the mesh, or deal with moving ...

Only top voted, non community-wiki answers of a minimum length are eligible