How do I push/pull objects smoothly?

Just started using Construct 2? Post your questions here

Post » Sat Sep 17, 2016 5:30 am

Hey, I want to make a platformer where the player can push and pull objects.
I've used this method to push/pull objects.
Image

It works, but the object box seems fidget. is there a way to have it move smoothly?
B
12
S
2
Posts: 33
Reputation: 714

Post » Sat Sep 17, 2016 1:52 pm

Check your project settings, how big are the objects? Is pixel rounding on/off?
B
13
S
3
G
1
Posts: 41
Reputation: 1,468

Post » Sat Sep 17, 2016 5:27 pm

Justin64 wrote:Hey, I want to make a platformer where the player can push and pull objects.
I've used this method to push/pull objects.
Image

It works, but the object box seems fidget. is there a way to have it move smoothly?


Check out Miu3's example below. :mrgreen:

platformer-push-pull-box_t64955
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 18, 2016 8:10 pm

Message: Justin64 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Theihe wrote:Check your project settings, how big are the objects? Is pixel rounding on/off?

My project is 640 by 480 and pixel rounding is off.

Gmoney wrote:
Justin64 wrote:Hey, I want to make a platformer where the player can push and pull objects.
I've used this method to push/pull objects.
Image

It works, but the object box seems fidget. is there a way to have it move smoothly?


Check out Miu3's example below. :mrgreen:

platformer-push-pull-box_t64955


I tried using that, however I want the player to be able to push/pull objects without any resistance. Is there a way for me to have plays pull/push objects without any resistance smoothly?
B
12
S
2
Posts: 33
Reputation: 714

Post » Sun Sep 18, 2016 9:11 pm

I thought Miu3's example was smooth enough? :?

If it's the speed, then I would tweak the settings in event sheet that are currently set to 30 for push and 20 for pull.
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 18, 2016 11:09 pm

When I adjusted the speed in the example it cause the objects to fidget as well. :/
B
12
S
2
Posts: 33
Reputation: 714

Post » Sun Sep 18, 2016 11:47 pm

I have found another thread with a capx example. This is not platform based, like the first one, but it seems its 8 direction method is pushing objects smoothly.

4-way-push-pull-object-help_t82846
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Mon Sep 19, 2016 7:27 pm

Message: Justin64 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Gmoney wrote:I have found another thread with a capx example. This is not platform based, like the first one, but it seems its 8 direction method is pushing objects smoothly.

4-way-push-pull-object-help_t82846


The downloads are no longer available. :(
B
12
S
2
Posts: 33
Reputation: 714

Post » Mon Sep 19, 2016 10:17 pm

Justin64 wrote:
Gmoney wrote:I have found another thread with a capx example. This is not platform based, like the first one, but it seems its 8 direction method is pushing objects smoothly.

4-way-push-pull-object-help_t82846


The downloads are no longer available. :(


This one was still available on that page. :mrgreen:

https://dl.dropboxusercontent.com/u/108 ... leBox.capx
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Tue Sep 20, 2016 12:26 am

Message: Justin64 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Gmoney wrote:
Justin64 wrote:
Gmoney wrote:I have found another thread with a capx example. This is not platform based, like the first one, but it seems its 8 direction method is pushing objects smoothly.

4-way-push-pull-object-help_t82846


The downloads are no longer available. :(


This one was still available on that page. :mrgreen:

https://dl.dropboxusercontent.com/u/108 ... leBox.capx


Thanks! :D I tried to implement it, but it still causes it to "fidget". I don't understand why since both the playerbox and objectbox have the same speed, acceleration and deceleration. It doesn't seem to be pushing the object correctly, it seems the object slightly bounces off the player box every pixel.
B
12
S
2
Posts: 33
Reputation: 714

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests