More about C.Objects

I was replacing some of my linked objects wioth a C.Object.
I tried to add a physics 2 behaviour to the C.Object from the editor (i mean the option to add the behaviour to the whole C.Object)

Problem is that it doesn’t work…probably i’m doin g something wrong (surely) …do i need to add the behaviour to any child ? or add it to the C.Object is enough? …or it is not totally possible…?..
Basically i got this…after binding the physics 2 to c…object


…also i can’t get the custom object animations to works…(ive ticked the “has animation” but seems to not do anything…)
if what i want can’t be done…how are extension behaviour used for c.object after assigned?..

edit: i’ve this fixed in a different way…still i would have some infos on the questions above.

If you’re talking about custom or prefabs. It can be confusing because not everything is supported.

Say you had the drag behavior. If you put it on the custom object it makes the entire object dragable as a whole. If you assign it to a child object then it makes just that child dragable.

I’m not sure if the physics behavior works for the main custom object. If you put the behavior on the children objects, if it works, I believe it would only work for objects within the custom object.

I’ve tried the platform behaviors. If you have a platform and platform character then the children objects can interact with other children object bit not scene objects.

Another issue is the custom object is it’s own scene. So, for certain things, you need to have the custom object itself in alignment with the layer it’s on. For example, 0,0. Otherwise it’s like the camera or layers are out of sync or Offset.

1 Like

yes i have noticed it…for example the sticker behaviour works but the physics don’t.

I’ve fixed it binding physic 2 to a proxy sprite and anchor the C.object above.
And yep, i too had that origin placement issue, i mean i can’t for example put c.object to any other object’s origin withot fixing the offset, …would be great to have an option to place the c.object origin…

more 2 cents…

  • if you for any reason resize the childrens, the c.object’s bounding box doesn’t fit and stay at original size…to me this looks bad bcs if you debug collisions the bounding/limit box looks off…

-i need more tests on this one…but looks like… Lights/particles aren’t fully threated as object/children for c.object
explanation: if you create a c.object with any object, you can then remove the objects as a whole from the scene and the c.object will still have those objects stored…this doesn’t apply for particles object…if you delete the particles objects after the creation of the c.object…even the particles in c.object are deleted or they stop working.

  • about the behaviour …well…we know

  • for last…the problem to pass the globals to scenes var…also this is a known problem

I’ve tested these but would be great if someone could dig more into it…

1 Like

It’s a mess. I tested custom objects using 2 dragable round children, a slider for the size and a dragable square scene object.

According to the debug display the custom hitbox never changes (which I guess is correct) but the center moves opposite of what I would expect. It also only cares about the lowest numerical position, it ignores the highest values.

Here’s it at start.

The center is in the center.

But if you drag one object downwards , the center moves outside of the hitbox. It’s not in the center of anything.

Unless I’m missing something, the center should either be fixed or the center of the combined children positions and maybe, just maybe, the objects hitbox. I say maybe. Honestly, IDK if the center should ever change. It caused issues with my test. Children objects no longer collide with scene objects if the other child object changed the center position.

IDK, I guess as the custom objects area grows, it’s center should also grow. It’s confusing. It’s basically a scene within a scene. Or a scene within an object.

I need to do more testing to throughly understand what’s happening. The X center only changed if a child was at a lower numerically X position than the custom object.

If you resize a scene object, the center is the center. If you resize a custom then the center should be the center of the minimum area of all of the combine child objects. Do you also figure in the original hitbox or object size? What if the child objects are no longer within the original object area?

well…thaz exactly what i said above…( bnut it don’t happen just in preview but even in c. object edit)…
i fixed my events excluding childrens collision boxes and use only the one u need…like
At creation—exclude unwanted collision boxes…(even in c.object event sheet)

EVEN EXCLUDING THE PARENT B.BOX

but not everytime you want this…

imho the bounding box should automatically fit to the bigger children’s collision box…
This (as uyou said) cause problems when using…conditions like boundingbox check…and not just that , i’ve spent hours to figure how to apoply a force at specific point.
it’s not that it doesn’t work if you know how to exclude what you don’t need, but i don’t wanna be in the shoes of someone using it for the first time, i had already enough…

what happen to you …look almost normal bcs when objects are not centered there is no way to tell which size collision box should be but still imo it should automatically fit to far objects edges automatically fit the center…
well…thaz too complicated for me to explain…but surely the way it works is not friendly for users…

still c.object is a “must” feature to have…just wish to have it more polished…

1 Like