Haxe блоги на других языках

OOP in Haxe

HaxeCoder - 6 May, 2018 - 14:01

What is Haxe?

HaxeCoder - 6 May, 2018 - 14:01

Unity Physics Debug Draw 2D

Allan Bishop's Developer Blog - 28 April, 2015 - 15:31

Developing games or anything interactive is amazing in Unity. Apart from that it is free (including pro features), the main reason I enjoy developing with it is the time saved by leveraging the editor. In addition, those interested in 2D physics games will also appreciate that Unity incorporates Box2D for it’s 2D physics engine. By using the editor you can very quickly create RigidBodies and Colliders in a matter of seconds.

However, one thing seemed missing and that was a good debug view similar to the debug view when using Box2D in Flash. To my knowledge, it seems only if you have the GameObject with attached collider selected in the editor will it render a wireframe view, and, it doesn’t seem to show up when running in game view. So to help with prototyping with Unity’s 2D physics I have created a component that will automatically render all colliders and joints in both the editor and game view. All you have to do is attach the script to the camera. You can download the script (and example scene) from my github.

The post Unity Physics Debug Draw 2D appeared first on Allan Bishop.

RSS-материал