1. Tags
So. The RUBE should have some tool for easy export a world to engine and find objects in this world. Now i use body/shape/fixture names as tag(Name like spider_leg2_root_left realy not cool).
And ability to set tags will be cool
2. Draw
Sometimes i need just set some point (Like spawn or center of gravity). For now solution for me is in an empty body(With name like spawn_red_small_bot, yea), but it's not good for optimisation and world's space
Other draw(Any figures) will be helpful for visual tags in RUBE world and vector drawing in game
I hope that it isn't only my problems and will be a helpful solutions
Tags and draw suggest
Re: Tags and draw suggest
1. I think you need to explain a) why finding things by name is 'not cool' and b) what is the difference between finding things by name and setting a tag. How would you go about setting a tag in the editor, and how would you go about finding an object by tag in your game after loading?
2. If you delete the dummy bodies after loading the scene, they should have no effect on the "world's space". You can use an export filter to exclude some bodies/fixtures from being exported, that would let you use them as a purely visual indicator while editing that will have no effect on the exported result. Look for "export filter" in the built-in help.
2. If you delete the dummy bodies after loading the scene, they should have no effect on the "world's space". You can use an export filter to exclude some bodies/fixtures from being exported, that would let you use them as a purely visual indicator while editing that will have no effect on the exported result. Look for "export filter" in the built-in help.
Re: Tags and draw suggest
because it's very long and uncomfortable process. I mean "rock_bad_50dmg_rolling_trigger_etc" fills awfullyiforce2d wrote:why finding things by name is 'not cool
it's not about finding. It about setting mostly. Editing names like that not fills goodiforce2d wrote:what is the difference between finding things by name and setting a tag
With another properties i guess. Array of user tags or somethingiforce2d wrote:How would you go about setting a tag in the editor,
it isn't has a matter - there just has to be way to identify objects.iforce2d wrote:and how would you go about finding an object by tag in your game after loading
I mean i need to export point, zones, etc. in gameiforce2d wrote:You can use an export filter to exclude some bodies/fixtures from being exported
Re: Tags and draw suggest
I can only guess that you mean, you want to set separately "rock" and "bad" and "50dmg" etc as individual properties for that item. This is what custom properties are for. Maybe this will help? https://www.youtube.com/watch?v=nCp-EK_IICA
See also the "Custom properties" pages in the built-in help.
See also the section about custom properties here: http://www.iforce2d.net/b2djson/#customprops
The reason I suggested using an export filter to exclude some items from export, was in response to your comment about visual aids while editing, that will not be exported.
See also the "Custom properties" pages in the built-in help.
See also the section about custom properties here: http://www.iforce2d.net/b2djson/#customprops
Yes, and the method you are currently using (dummy body or fixture) should work fine. After you load the level, you can get the position of the dummy items, then delete them so that they don't interfere with anything.Tymonr wrote:I mean i need to export point, zones, etc. in game
The reason I suggested using an export filter to exclude some items from export, was in response to your comment about visual aids while editing, that will not be exported.
Re: Tags and draw suggest
hmm.. it pretty welliforce2d wrote:See also the section about custom properties here
yes. But not welliforce2d wrote:Yes, and the method you are currently using (dummy body or fixture) should work fine
Re: Tags and draw suggest
You will need to be more descriptive if you want people to offer useful help.Tymonr wrote:yes. But not welliforce2d wrote:Yes, and the method you are currently using (dummy body or fixture) should work fine
Re: Tags and draw suggest
![Image](https://i.imgur.com/9kK42yf.png)
So, custom props is nice solution, i guess(But little hard to find(I know that is in tutorial menu))
With drawing i'll use scripts for now, but vector shapes will be good feature anyway