Physics: Bar of Soap in a Cardboard Box?

Get help using Construct 2

Post » Wed Oct 23, 2013 7:10 pm

I think the file got corrupted when I deleted stuff. I copy/pasted everything into a new project and added comments. Try it now.

Basically I made the box immovable and then rotate it manually when the player hits it - instead of letting the physics engine do it.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,680

Post » Thu Oct 24, 2013 1:42 pm

@Canada GDP, all objects that interact must have the physics behaviour. However you can set each object to be immovable (see object physics property). The grey boxes are set to immovable, so the rectangle is just resting on the two boxes. If you hit the rectangle enough from the one side you can get it to fall off the boxes and you will see gravity take effect. The magic button, was showing how you can hide them to create the floating effect of the rectangle. It is resting, just looks like it is floating.

There may well be better ways, but it was what I came up with to try solve your problem. Hope that is now clearer.
B
13
S
4
Posts: 67
Reputation: 1,270

Post » Sat Oct 26, 2013 12:12 am

I'm out of town this weekend but I'll let you folks know how everything goes when I get back and have a chance to work on it. Thanks so much for all your input!
B
12
S
2
Posts: 23
Reputation: 738

Post » Tue Oct 29, 2013 8:19 pm

The "soap in a box" is working pretty great now, thank you!

However, I'm encountering one final problem with it. As has been said before, Platform does not like working with Physics, and every once in awhile I can get some weird glitch to occur as a result of that (i.e. The Name Box suddenly becomes glued to the dustpan and follows it around before descending into the earth).

It looks like I'll need to get rid of the platform behavior, which shouldn't be too big of a problem. I'll be toying around tomorrow with different ways to mimic the Platform's "jump" function.

If anyone happens to know the "best" way to substitute the Platform's jump mechanism, let me know if you're bored. I'll probably figure out how to do it on my own, just curious if there's a really clean, efficient method.
B
12
S
2
Posts: 23
Reputation: 738

Post » Tue Nov 05, 2013 5:53 pm

Everything's worked out great! I'm right back on schedule on this game. Thanks for all the advice.
B
12
S
2
Posts: 23
Reputation: 738

Previous

Return to How do I....?

Who is online

Users browsing this forum: humanescape, R0J0hound, warmty and 6 guests