How do I make the physics object work with platform movement

For questions about using Classic.

Post » Mon Sep 22, 2008 5:55 am

This might seem like a simple question, but I can't figure it out. I'm pretty sure I've been able to do this before but now I can't.

How do I make it so physics objects (boxes, crates) can be pushed around by objects using the platform movement?

I want to make a crate that can be pushed around by the player. But instead when I try it out, the player is about walk through it. What am I doing wrong?
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Mon Sep 22, 2008 6:16 am

I think you may have to add a physics behaviour to your player, as well as the platform movement. Just set the parameters so the player is not affected by gravity or friction and it should work fine. If not, the only other thing I can think of is setting the common settings for the boxes AND player to "solid" and that may also work. See how you go, if no good then I will try to make a CAP for you.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Sep 23, 2008 5:28 am

I tried that already. In fact, I've already tried everything you just mentioned. The player ends up glitching and getting launched into the air or teleports to the other side of the object its colliding against, as well as several other strange behaviors.

There must be some other way to do it. I'm pretty sure that's not it.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Tue Sep 23, 2008 6:15 am

I just tried it, and it's fine... though for some reason you can no longer push the "box" object if it stops moving for some weird reason... other than that it works perfectly.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Tue Sep 23, 2008 10:31 pm

That's not the only glitch. It looks like it works fine but play around with it for a while and you'll notice some bizarre things. For instance, right now, my character unexpectedly disappeared off the screen because the physics objected landed on its head. I tried again to see what happens if the player is under the physics object and I got warped to the left or right of the screen.

Here, take a look at this .cap file. Put yourself underneath the falling object (let it fall on your head, in other words) and see what happens:
http://machriderx.googlepages.com/platform.cap

I don't think this is how it's supposed to be done. The two movements are obviously conflicting with one another. Call me crazy, but I thought there used to be option in the event sheet editor where you can include which objects can collide with the physics object. All I see now is an option to disable collisions with an object.

Maybe it was in an older version, but I don't want to go back and install every old version of Construct to see if it was there. If it wasn't then I don't know, I'm pretty sure I was able to get this to work in an older version without assigning two behaviors for one object. I thought this was a pretty basic thing that Construct could do without a problem (or any strange glitches, for that matter).
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Tue Sep 23, 2008 11:21 pm

Hmmm yeah it doesn't quite work 100% right does it... I started having a few weird problems with my example as well, like objects not moving after they came to a complete rest, even though the player had higher mass etc than the object being pushed.

Either one of a few things will need to happen:

1. Make your own custom movement engine for your character, and ditch the platform movement.

2. Don't use physics objects at all

3. Try making your player just ue platform movement, and make an invisible "detector" object thats always right next to your character which has physics properties. Maybe using a sperete object would work better?

4. Team Scirra will need to address the issue of multiple behaviours on a single object

5. Make it so non physics objects can interact with physics objects, as you suggested it may have been there before.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests