Search the Community
Showing results for tags '2d'.
Found 3 results
Hello, I am creating 2D mobile game, where will player create own platforms on which will be moved fluid. From testing I found, that in 3D I have better fluid physic and performace, so I decided create this game in 3D, but use camera in 2D view and I want use your asset to build platforms. Platforms will be: Straight -> blocks Combined with other platforms -> no spaces between neighboring platforms Every platform could be erased Player will create platform from first click to mouse position or position where was released mouse button Creating of platforms by player (own script): As first thing I am calculating angle between two points (first mouse button click and release button position or mouse position in drag) Via this angle I will calculate edge points by given height of block (for me in 2D it is width -> variable widthLine) Using function CreateShapeFromPolygon Platform is created angleDeg = Mathf.Atan2(platform.secondPoint.x - platform.firstPoint.x, platform.secondPoint.y - platform.firstPoint.y); points = new Vector3; points = new Vector3(platform.firstPoint.x + widthLine * Mathf.Cos(angleDeg), platform.firstPoint.y - widthLine * Mathf.Sin(angleDeg), 0f); points = new Vector3(platform.secondPoint.x + widthLine * Mathf.Cos(angleDeg), platform.secondPoint.y - widthLine * Mathf.Sin(angleDeg), 0f); points = new Vector3(platform.secondPoint.x - widthLine * Mathf.Cos(angleDeg), platform.secondPoint.y + widthLine * Mathf.Sin(angleDeg), 0f); points = new Vector3(platform.firstPoint.x - widthLine * Mathf.Cos(angleDeg), platform.firstPoint.y + widthLine * Mathf.Sin(angleDeg), 0f); platformObject.GetComponent<pb_Object>().CreateShapeFromPolygon(points, m_Height, m_FlipNormals); Combining of platforms: If player click on created platform from side where he clicked will be created another platform Not combine objects like this (on center -> use last point of created object): Combine objects without any spaces like this:(because player can drag with second platform, it must be dynamic generated by mouse position) Problems: Is there some chance how create this platforms easily than how I am creating them now? (point -> Creating of platforms by player (own script)) Is there is some posibillity how combine objects without any spaces? I tried calculate it by angles and distances, but it is not precisely and very hard. Not solved yet by math. Is function CreateShapeFromPolygon good for use on this problem or is some better function? In combine of objects, objects can´t overlap, because in overlap area will be maybe another shade? If platforms will don´t have overlap areas, and one object will be erased, combined object must be edited to basic shape. Thank you very much for your time and help!
Hey everyone, I've gotten started playing with Pro-builder basic and it's seriously a lot of fun to make shapes with such creativity. I'm wondering if it's appropriate to use Pro-builder tools for creating a game that's 2D pixel art but rendered in 3D space, similar to this (image not mine, simply used for reference). I was trying to link planes together and use it but I was having trouble. I would also like to know how I would go about making sure that each tile created with Pro-builder is pixel perfect, for instance if my pixels per unit in my game was 32. Thanks a lot, and great tool!
I posted this on facebook a couple of days ago. When you grab multiple sprites (in this case 4) and move them, ProGrids doesn't know what to do. I'm using the latest Unity Store version. I can't work like this. Dragging and dropping one sprite at a time is way too time consuming.