How do I keep gravity constant while my object is moving?

Get help using Construct 2

Post » Wed Oct 01, 2014 8:02 pm

Long story short.
Im simulating a falling object, and after X time has passed, the gravity is set to an X number so the object actually starts falling. The thing is, when the object is moved by the player, the gravity stops working, locking the object in the Y axis, unless left alone.

Does anyone know what am I missing here?
How do I make the object keep the gravity, without stopping when moved?

Thank you for your time!
B
5
S
1
Posts: 4
Reputation: 388

Post » Thu Oct 02, 2014 9:38 am

You can add this event:
Every tic - set object gravity to x

But what behavior did you use?
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Thu Oct 02, 2014 11:34 am

Attach a capx to your post.
That will make it easier for anyone to investigate and provide help in return.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Sun Oct 12, 2014 8:17 pm

My apologies.
I uploaded the .capx now.

I added a little comment on it to try and explain the issue a little more.
The goal is to have the object keep falling, even if the player moves the object.

I apreciate the help!
You do not have the required permissions to view the files attached to this post.
B
5
S
1
Posts: 4
Reputation: 388

Post » Sun Oct 12, 2014 9:43 pm

Is the gravity the only reason you're using physics? If so, you could use the platform behavior (which has gravity) instead of the 8 direction and physics. You also wouldn't need the pin if you did this.
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Mon Oct 13, 2014 1:15 am

Yeah, if all you want is simple gravity, the physics behavior is way overkill. It's better to use something like platform or custom movement.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Oct 13, 2014 2:16 am

Thanks a lot.
Changing "Physics" for "Plataform" actually improved my issue and another one I had.
This change lead to other possibilities and I ended up removing "Pin" too.

Thank you for your help, guys!
B
5
S
1
Posts: 4
Reputation: 388


Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk and 63 guests