actually... it wouldn't be like that at all... it should be automatic...
you're still thinking procedural, which is why you too don't see the entire process clearly...
a hand moves... that's all... now, the result of this movement can cause something to be pushed... or not...
was it Newton who came up with the for every action there is an equal and opposite reaction thing... well, a hand doesn't really care about all this... but the physics object (unseen, yet still there) that Newton was referring to does...
it is what represents (implements in code) the force that does the actual pushing...
stop for a second and think about it... if a hand, or a calculator, or an apple, a pen, anything that was derived from, or was a child of a collider object, raised a collison event, they would automatically react...
the only thing that a hand would do, would be to move... the collider functionality would be what pushes whatever it came in contact with... it would check for collisions and automatically invoke the required interaction to it's descendant class objects or its child objects... just like real world objects...
you're right about one thing though... it can be a lil confusing... at least until you get used to the more granual approach OOP development demands of you... it's naturally gonna be hard to abandon the way you've been comfortably doing things for so long, and adopt a new approach towards them... especially if what you were doing has worked so well for you... OOP should probably best be apporached gradually (although i might think differently, as i see it as an all or nothing thing) as to ease a coder from what he/she has ingrained in their thought and dev process...
but the benefits of approaching coding like this cannot be overstated enough... once the physics has been implemented, either at the base of the class hierarchy, or as a class which objects can be parents to other objects, you no longer have to concern yourself with it any more... all descendant or child objects will automatically be physical... now, all you have to concern yourself with is implementing your calculator to calculate... if it is pushed, it will automatically react as the physics in the world you are coding tell it to...
--Mike
you're still thinking procedural, which is why you too don't see the entire process clearly...
a hand moves... that's all... now, the result of this movement can cause something to be pushed... or not...
was it Newton who came up with the for every action there is an equal and opposite reaction thing... well, a hand doesn't really care about all this... but the physics object (unseen, yet still there) that Newton was referring to does...
it is what represents (implements in code) the force that does the actual pushing...
stop for a second and think about it... if a hand, or a calculator, or an apple, a pen, anything that was derived from, or was a child of a collider object, raised a collison event, they would automatically react...
the only thing that a hand would do, would be to move... the collider functionality would be what pushes whatever it came in contact with... it would check for collisions and automatically invoke the required interaction to it's descendant class objects or its child objects... just like real world objects...
you're right about one thing though... it can be a lil confusing... at least until you get used to the more granual approach OOP development demands of you... it's naturally gonna be hard to abandon the way you've been comfortably doing things for so long, and adopt a new approach towards them... especially if what you were doing has worked so well for you... OOP should probably best be apporached gradually (although i might think differently, as i see it as an all or nothing thing) as to ease a coder from what he/she has ingrained in their thought and dev process...
but the benefits of approaching coding like this cannot be overstated enough... once the physics has been implemented, either at the base of the class hierarchy, or as a class which objects can be parents to other objects, you no longer have to concern yourself with it any more... all descendant or child objects will automatically be physical... now, all you have to concern yourself with is implementing your calculator to calculate... if it is pushed, it will automatically react as the physics in the world you are coding tell it to...
--Mike