Adding Better Item Placement


The way the camera works was as follows:

CAPTURE:
- Item is "disappeared", collision is removed and item is made invisible
- Item is added to array
MOVEMENT:
- Original item becomes a "ghost item", partially transparent and movable
PLACEMENT:
- The "ghost item" is made solid and its attributes are copied to a new item
- The "ghost item" is deleted and the new item takes its place

This method of doing things makes it harder to add certain attributes to be "copied over" as it has to be done manually, additionally, in my opinion, it is quite messy.

The new method keeps the ghost item, and turns it back into a regular item. You might be wondering why the original Project Capture did this... well... put simply, the current capture method didn't allow it.


Originally capturing would remove collisions by changing the "solid" attribute to "no collisions" and then back to "bounding box", the problem with this was that the collider would not move with the object when disabled, and this would happen:


Not good!


However, Croject Papture alleviates these problems by keeping collision enabled, but changing the collision group instead, having the same effect, except the collider remains aligned with the object!


This means that the requirement to create a new object is no longer needed!


Now, relatively few things are left before the mod is ready:

TODO:
- Add scaling into new placement method
- Reimplement whitelist with vanilla items (you can currently capture things that you... shouldn't be able to)
- Add certain non-object entities (such as frankenturrets)
- Fix camera initialisation (camera initialisation buggy and has a terrible hack to make it work)

Get Croject Papture

Leave a comment

Log in with itch.io to leave a comment.