2D SideScroller with Physics

For questions about using Classic.

Post » Fri Feb 25, 2011 1:48 pm

Hi everyone,

I need to help.
Im testing your cool engine for the second time.

I have ground - black sprite - physics behavior, immovable ticked + solid.
Then I have boxes - yellow sprites - physics behavior, gravity + solid.
Then I have PLAYER character - green sprite - platform behavior, solid ticked.

I need to collide the player with the boxes, push them, etc. How to do that? Im messing with it 2 hours without result :(.

[url:33l3o1gm]http://www.2shared.com/file/US7_PnoA/platformer.html[/url:33l3o1gm] - my .cap file
B
2
G
2
Posts: 35
Reputation: 720

Post » Fri Feb 25, 2011 2:45 pm

please help!
B
2
G
2
Posts: 35
Reputation: 720

Post » Fri Feb 25, 2011 2:46 pm

Make the player an immovable physics object as well. And just move it with the platform movement. Or make your own platform movement for the player out of physics operations. If you use the first method, you'll notice the boxes move out of the way, but with no real force. To fix this, you can give your immovable physics player commands like
always -
----set physics horizontal velocity to. Platform horizontal velocity * factor

I don't think those are the actual expressions, but I don't have my pc in front of me. Factor will be a number of your choosing, expirement till it seems right. Even though you won't actually be moving the player with physics, this will let the physics engine know the object is moving

I have a potential fix for physics that will make it work naturally with outside movement without the extra steps. Hopefully it will make it into a future version of construct
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri Feb 25, 2011 2:53 pm

This isn't very helpfull for me, becouse my english is not very good.
I understanded only first first method, but it do not work - i can't push the boxes...
B
2
G
2
Posts: 35
Reputation: 720

Post » Fri Feb 25, 2011 3:24 pm

please! :(
B
2
G
2
Posts: 35
Reputation: 720

Post » Fri Feb 25, 2011 3:30 pm

I was looking for the answer to this yesterday, these are the best examples i found -

Example caps posted by Xeno and Minor

[url:3jp64w2j]http://dl.dropbox.com/u/1646976/pushing2.cap[/url:3jp64w2j]

[url:3jp64w2j]http://dl.getdropbox.com/u/1646976/pushing.cap[/url:3jp64w2j]

[u:3jp64w2j]or go to this page -[/u:3jp64w2j]

[url:3jp64w2j]http://www.scirra.com/forum/viewtopic.php?f=3&t=6866&hilit=pushable[/url:3jp64w2j]

Good luck.
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Fri Feb 25, 2011 4:57 pm

thanks bro!

but i want on the pushable boxes PHYSICS behavior, not the PLATFORM "Physics" behavior.. :?
B
2
G
2
Posts: 35
Reputation: 720

Post » Fri Feb 25, 2011 5:36 pm

anyoneee help?
B
2
G
2
Posts: 35
Reputation: 720

Post » Fri Feb 25, 2011 6:14 pm

please! i need it fastly :(
B
2
G
2
Posts: 35
Reputation: 720

Post » Fri Feb 25, 2011 7:11 pm

probably best not to keep replying to your thread over and over.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests