[Feature Request] A script that allows for us to rotate shape items in inventory

ElRafaVaz

New member
Hi Opsive,

I've been having fun exploring the shape inventory system and I think it is quite powerful! One thing I would request for a future release however is the ability to rotate shape items in the inventory (i.e. rotate their ItemShape so you can try and fit more stuff). It would be helpful for the game I'm working on, but I've seen a lot of games that allow you to do this in order to maximize gameplay in the inventory screen. I can imagine the input being different for different games, but in my mind it'd be useful to bind it to the arrow keys or the scroll wheel.

Cheers!
Rafael
 
Hey ElRafaVaz,
Thank you for the request. I will add it to the list.

Unfortunatly I have to say that this is something quite complicated to do and not many people using UIS will take advantage of it. So it is quite low priority.

If you really need it for your current game, you may want to look into implementing it yourself or have someone implement it for you.
 
Unfortunatly no, this feature is was not implemented, there simply wasn't enough interest by the community compared to other features.
We may reconsider this feature for a major update to the asset, but it really depends on how many people show interest in this feature
 
Unfortunatly no, this feature is was not implemented, there simply wasn't enough interest by the community compared to other features.
We may reconsider this feature for a major update to the asset, but it really depends on how many people show interest in this feature
Okay thank you! Then I’ll create the feature by myself :) I have an investigation issue ready for it, would you have any idea where I could investigate?
When it’s done I could absolutely share it with the community.
 
That would be awesome, thank you! :)

The you will need to make a custom ItemShapeController ItemShapeData and ItemShapeGrid.

The ItemShapeData holds the info on the item positions in the grid. You'll need to add rotation data in their.
Then you'll need to use that additional data in the ItemShapeController to define if the item fits in the grid from the pivot point, position and rotation.
Finally in the ItemShapeGrid you'll need to use the rotation data to rotate the item using the pivot point. That might be complicated because the UI pivot point anchor and the logic anchor pivot point (from ItemShape) is not the same. So your ItemViewShape might need some changes too.

You'll find the ItemShapeControll and Data in the player Ivnentory gameobject. and the rest you'll find on the ItemShapeGrid gameobject.
Most likely you will be required to either duplicate the existing code as I don't think you will be able to override some of the necessary changes. Either that or you can directly change the source code, but do keep in mind that any changes you make to source code will be deleted if you update the asset.
Good luck and let me know how it goes :)
 
Looking into this currently! I also see it was mentioned a few days ago in discord. It would be amazing to have this.
I'm about to start implementing a completely new UI system, just because of this one feature, but I'm unsure whether to start or not based on if we're getting this feature in an official release or not.
 
I'm afraid I cannot give any ETA on this as it is not yet planned. It is on the backlog though as it seems more people are interested in it.
At least I can say don't expect it on the coming months.
If you are working on a game right now I'd recommend you stick to the current version and make your own UI. In your future project hopefully we'll have a built-in solution for this kind of feature.
 
I'm afraid I cannot give any ETA on this as it is not yet planned. It is on the backlog though as it seems more people are interested in it.
At least I can say don't expect it on the coming months.
If you are working on a game right now I'd recommend you stick to the current version and make your own UI. In your future project hopefully we'll have a built-in solution for this kind of feature.
Hello, for "ItemShape", rotation is a necessary function. For any grid using "ItemShapeGridSystem", rotation is an essential function. As a gamer myself, I have played many games that use the "ItemShapeGridSystem". Personally, I think if the "ItemShapeGridSystem" is used but the "ItemShape" cannot be rotated, this would be a very troublesome issue for players. Although as you mentioned before, it is rather complex to implement, in my opinion, if we use "ItemShapeGridSystem", then rotating "ItemShape" is an essential basic function. Additionally, regarding "ItemShapeGridSystem", I think the built-in "ItemShapeGridSystem" function in the initial plugin is too limited. Of course, this plugin is only the "inventory system".
 
Okay thank you! Then I’ll create the feature by myself :) I have an investigation issue ready for it, would you have any idea where I could investigate?
When it’s done I could absolutely share it with the community.
Hello, could you please tell me if the function has been implemented?
I just finished the "ItemShapeGrid" with dynamic size.
I'm now planning to think about how to implement the rotation of "ItemShape".
Do you have any completed code or ideas?:unsure:
 
Hello, it's still the implementation of the "ItemShape-Rotation" function. Recently, I'm planning to implement this function.
I am currently thinking about how to implement this function.
From the hints you provided in this post, I have learned that some parameters related to rotation need to be added.
However, on the other hand, regarding how to trigger the rotation operation, my current thinking is to expand the "ItemViewSlotDragHandler.cs" file, or to reference "ItemViewSlotsContainerBase.OnItemViewSlotDragEvent" to obtain the "dragging" state to determine the conditions for allowing rotation, and then make the call.
I haven't actually implemented it yet. So, I would like to ask if any of you have any ideas?
If there are detailed implementation steps, that would be even better.:unsure:
thank you :)
Ok I've taken note of the feedback
 
No, unfortunatly ItemShapeGrid item rotation has not been implemented and probably won't be for still awhile. We are currently busy on other higher priorities for the InventorySystem

So it makes sense for you to implement your own solution.
You are on the right track. You'll also want to edit the ItemShapeGridData to not only store position but also rotation data. And then check validity whether an item fits or not. And of course you'll want to edit the ItemShapeItemView so you can actually visualize the item being rotated in the UI.

This is not trivial, it'll most likely will take you some time to figure out and implement
 
Back
Top