How do I create more realistic Physics for dropped objects

Get help using Construct 2

Post » Wed Sep 23, 2015 7:45 pm

Hey guys,

I have been working on a feature for my Platform-style game - the ability for the games character to drop items. Since Platform games seem rather prevalent in the C2 Community, a solution may be beneficial to everyone.

What I am trying to accomplish using the Physics behavior is to have the dropped items fall realistically onto other dropped items that are already on the ground.
For example, if I drop a Sword on top of an Axe that is laying flat on the platform, then the dropped Sword should not stack on top of the resting Axe, but instead overlap it - while realistically disturbing the resting Axes position subtly as well as the Swords position on contact.

By "realistically" I just mean something that looks natural.. for instance a random adjustment to the objects angle on contact as well as possibly a subtle force put on the object in a certain direction.

I have been toying around with the different Physics features for sometime now and I just can't seem to get something that looks good. I had done something that sorta worked but became less and less realistic as more objects were being dropped.

Image
Note: Gravity is disabled in my game, and instead I apply a downward force on all objects being dropped. This is because my game isn't really a traditional Platformer (it looks like a Platform game but the character is able to move up and down as well). Additionally, I intend to make the Sword object part of a Family.

Help is always appreciated. Thanks everyone for reading.
B
86
S
29
G
10
Posts: 100
Reputation: 10,535

Post » Wed Sep 23, 2015 9:51 pm

Did you try playing around with the density, elasticity and linear damping of each object? This will give you the 'feel' of the objects weight and the way it bounces off other objects.
B
9
S
3
Posts: 104
Reputation: 1,033

Post » Wed Sep 23, 2015 10:12 pm

I did yes, but the objects are stacking on top of each other instead of overlapping in the way that I want.

A sword is flat, so I want it to be treated as such, and have other swords overlayed on top of it if they are dropped on top of it, instead of having the sword stack on top of other swords (I hope this makes sense).
B
86
S
29
G
10
Posts: 100
Reputation: 10,535

Post » Wed Sep 23, 2015 10:21 pm

Have you tried changing the shape of the collision boxes? if you make it so they aren't rectangle, they shouldn't stack.
B
9
S
3
Posts: 104
Reputation: 1,033


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests