I agree, custom object should be indistinguishable from built-in objects. The visual editor was a huge step in the right direction.
You can place the children objects in the custom object where you want to. You can placed them centered or offset. It might not be the same but it might work.
You could also create your own actions, expressions and conditions. You could create your own position action or an expression that returns set locations.
You could make an action that allows you to rotate the custom object around different objects instead of points.
Itās not ideal. You could also create suggestions.
thx i understand now.
The first time i got the children offsetted, but it was my fault cos i was in snap to grid mode and i didnt noticed.
but it looks like there is always a bit of offset, i mean the object looks right when rendered but the true pos is offsetted, it makes it kinda hard to work on itā¦visually
Guys ā¦you are surely more informed than me on this matterā¦
to dateā¦are custom object still being worked on?
i meanā¦any news to let c.object interact with in scene objectā¦? like read other object vars eccā¦?..or for example to destoy a children when something outside its event happen?
like e.g. reading a var from a non custom object inside a custom object event.
There has been some major and minor changes to prefab or custom objects. They definitely seem to like the them and continue to tweak it. The best update was when they added the visual editor.
Interacting with objects with behaviors has always been difficult unless you use function calls (actions, conditions or expressions) from the scene eventsheet that provides the objects as a parameter. Otherwise, prefabs and behaviors can only do things like collision detecting between its own child objects.
Behaviors like platforms and pathfinder interact with different objects through the use of a 2nd behavior that adds the other objects using managers or lists. I still donāt understand the process. Javascript also helps and might be required.
The easiest way IMO is to add an action to the custom object that is triggered on every frame from the scene. The action would include the other scene object(s) as a parameter. Note: if you do a collision test between a child object and a supplied object through a parameter the custom object needs to be at position 0,0. Children objects are one their own layer, so if the custom object isnāt in sync with the scene layer, collisions will be offset as well. The children can be anywhere, itās the custom object that needs to be in sync and at 0,0.
Yeah, me too I love custom objects. I just wish the interactions were easier.
Iām trying to think about how a collision condition would work inside a prefab because you need an object name to test against. Maybe if you could use an object as a setting or property. Something that could be done just once to create the link.
Maybe it needs events for some form of manager that would handle this.
Iāve wondered if it was possible to test for collisions between children objects of different custom objects. Iām not sure if or how that would work.
link an object.property to check a collision would probably workā¦however i guess devs are already figuring out how to create conditions/actions lists for c.object and c.objectās childrensā¦.iā¦guessā¦
Itās not just the collision ā¦(that idd would be a must to have feature)ā¦
but is the abilty of c.object to āunderstandā what happen outside its events that i would like to haveā¦
ā¦basically to have a list of actions/conditions similar of what we have now for non c.o.
Itās difficult because custom objects are like scenes within scenes. Theyāre self-contained. Itās probably best to keep everything inside the same custom object but even if something isnāt practical, I love the challenge of making it happen even if itās ridiculous or inefficient.
Say I had 2 custom objects. They both had apples and baskets. I can easily test if prefab1 apples are in collision with itās basket but not prefab1 and prefab2 apples or baskets.
A cheap workaround might to be using scene variables and create an array of the position of the apples or at least the apple that is being dragged. Another variable could track the drag state.
This is all inefficient but I could then check the distance between the variable position and the apples or baskets in the other prefab. You could even use a hidden test object and move it to the position in the variables and test for a collision between it. You could then trigger a delete in the one prefab and add the object to the other prefab.
Again, this is impractical but Iām just trying to brainstorm.
yep it would works for simple collision boxesā¦or something simple in generalā¦
you basically doing something like the āpoint insideā condition.
ā¦not performances friendly but it should works as an hybrid collision check.