Centre of Mass with collision
Valan
Member, BASIC Posts: 410
When I set a figure to the Centre of Mass of an object there cannot be any collision associated with it. If there is then the Centre of Mass goes screwy.
Is this a bug?
Comments
@Valan -- I am wondering about this also. For me, it seems that a collide behavior or a collision rule causes an actor's center of mass to revert back to 0,0.
Are you seeing the same thing?
Sounds like this is not the intended behaviour.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
It seems that rotate behaviors revert back to a 0,0 COM whenever there is a collide behavior (or rule) is associated with the actor.
Perhaps its not rotate behaviors, but changes in angular velocity that is the common denominator.
But more testing is needed.
Could you send us an example project? I tested COM and collision and it seemed to work ok.
Sent you a PM with a quick example
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
They are working on it.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Any progress on this yet? I could use center of mass for the pinball jam about now...
Other collision/CoM issues seem to do with the way acceleration is being applied, but this is a really weird one (we don't apply acceleration on rotation, just velocity). Still trying to track it down, now that custom font work is done.
Did you get that sample project I submitted via the chat bubble a few days ago?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Yes, that appears to be caused by a collision triggering as soon as the game starts, before all the actors have been fully set up. Why changing the CoM triggers it I'm not sure yet, but it looks like it's an accident that it's worked up 'til now.
Hopefully I'll have a fix in a day or two.
Excellent!
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Do we know if this is now fixed in the upcoming release?
I'm using a constrain on rotation in my current project and the centre of mass reverts back to 0,0.
1.25 may be ready any day now.
In 1.25 it´s possible to pin the CoM so it will work with constrains.
Mental Donkey Games
Website - Facebook - Twitter
Great. Thanks for the info.
Using pin there is not even a need to add constrains the pin feature functions as a constrain. Just place the actor where you want it. The position is still shown from center so position it taking into account the offset you added in the COM fields.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Right, but there might still be cases where you want to use constrains. In 1.24.42 the CoM does not function properly with constrains, but in 1.25 the CoM and rotation constrains work together nicely.
Mental Donkey Games
Website - Facebook - Twitter