How do I move a physics object

Get help using Construct 2

Post » Sat Sep 05, 2015 12:39 am

Hello, I've got a simple question :

I can move an object like "on key is down => move forward 2pixels" so it move smoothly.

My problem is when I release the keycode, I want the object to move down, say 2pixels/tic or ms during 50px or 1 second, but I cannot find a way to do it, can someone help me?
(the object is a physics object)

cannot link capx yet :/

Thanks for replying and helping me.
B
3
Posts: 1
Reputation: 177

Post » Sat Sep 05, 2015 6:23 am

instead of using 'move forward', Give your Sprite directional movement behavior.

Then use 'on key A is down' > Simulate Moving Left
Then use 'on key D is down' > Simulate Moving Right

You can set the max speed of the object as you like.

Use the physics behavior to enable and disable gravity as you need. Use the 'on key is down' 'on key is released'
to trigger
B
9
S
3
Posts: 104
Reputation: 1,033


Return to How do I....?

Who is online

Users browsing this forum: jezjones24, minigame, semaso and 4 guests