A behavior to change an objects collision boundaries is needed
-
Currently it is impossible to change the shape of an objects collision boundaries while a game is running, and I think we need a behavior which can do this. Being unable to do this makes it hard to change an objects shape because we can’t have the collisions reflect the new sprite without using a different object. This could also allow for custom shapes to be dynamically created during gameplay with empty objects, which opens up many potential graphical possibilities.
-
Definitely will be a useful feature!
Instead of having to manually place and set empty object collisions for some terrain, we could have custom generated terrain. Would make things easier and would bring cool possibilities.
-
So how would you guys expect/want this to work as a behaviour?
Changing collisions is pretty visual. So are you thinking like a change collision behaviour, properties would be object you want to change collisions, and then a button to open the collision editor for that object.
When behaviour is triggered it changes to your drawn collision?Or is there something else you were thinking.
-
@murtaza I think I would say when you open the behaviour, there's some sort of button or thing to interact with, maybe an image of the collisions, when you press it you'd go to collision editor for the object selected?
Edit: yeah that's exactly what you said actually lol -
I was also thinking about more of a mesh thing.
You could get the collision points of an object and set the collisions using the points, or something similar like that.
If we want it dynamic, there should be an input field.
-
@murtaza I was thinking that, but also with a way to edit it as an array of points for extra precision and dynamic collisions. Sort of like how the rotate to angle behavior has both a wheel and a text input field.
-
So, I briefly spoke with @Hamed about this. It's doable, but trickier than I thought it would be.
Showing the collision editor from within the behaviour editor is currently not possible, just because of the way we manage the editors. We'd have to change how it works behind the scenes. It's possible, but requires a bit of time.Changing the collisions using an array of points is easier, but the issue here is there is currently no point of reference for users. Meaning, it would be a lot of trial and error for you guys since you don't really know where the points are.
We'd need to tweak the current collision editor to show the point coordinates, this way you would have some sort of idea where things are if you were to enter the points manually with an array.Soooo, It's doable, but not for a little while as we're in the middle of 3 updates.
IF this is something you guys really want and will actually use I can try to prioritize this. But I don't want to spend the time on a feature that won't be used. -
Personally, I don't mind if it's like 3 updates away. If we really want changing collisions for now we can replace the object with the collisions with a duplicate. Having input fields and being able to have dynamic collisions sounds really cool if it's possible.