How do I use physics only for my player

Just started using Construct 2? Post your questions here

Post » Thu Dec 29, 2016 3:15 pm

Hello,

I'm working on a game when the player is just a circle who can jump between platforms. My problem is my player with the physics behavior go through the solid objects (my platforms).

It is possible change that or I need to use the platforms behavior ? Even when I add the solid behavior it still fall through the platforms.

Thanks
B
11
S
3
G
1
Posts: 14
Reputation: 1,203

Post » Thu Dec 29, 2016 4:44 pm

It would probably be best to just use the platform behavior. You kind-of have to make the entire game physics based if you want to go in that direction instead (not just the player).
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Thu Dec 29, 2016 5:36 pm

Ok so what is my best option ? The behavior is simple, when the user click a force is added on the player and he move in the direction of the click. Just that. It's not a real jump, just a force added in a direction.
B
11
S
3
G
1
Posts: 14
Reputation: 1,203

Post » Tue Jan 03, 2017 7:47 pm

Vinke wrote:Ok so what is my best option ?

I think you should better use the platform behaviour.
Vinke wrote:when the user click a force is added on the player and he move in the direction of the click.

I don't know if I got it correctly, if you want the player to move towards the position of the click, try this:
Event ->Touch -> Is in touch -> (Action) PlayerObject -> Move dt*100 at angle (Player.X, Player.Y, Touch.X, Touch.Y)
You can change the "dt*100" expression to change the speed of the move
B
21
S
7
G
1
Posts: 165
Reputation: 1,912

Post » Tue Jan 03, 2017 7:49 pm

Anyway, there are many free demo templates (.capx files), I´m sure you can find something helpful.
B
21
S
7
G
1
Posts: 165
Reputation: 1,912


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest