How do I make the player move with another object...

Get help using Construct 2

Post » Mon Jan 12, 2015 4:30 pm

How do I make the player move with another object, yet still be able to move around relative to the object. In other words, what is the best way to let the player walk around on the deck of a moving ship. (the ship may be rotating and accelerating all the while). Don't bother saying to just pin the player to the ship, that doesn't allow player movement)
B
11
S
4
G
1
Posts: 159
Reputation: 1,803

Post » Mon Jan 12, 2015 4:52 pm

Something like this?

platforminertia.capx
You do not have the required permissions to view the files attached to this post.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Mon Jan 12, 2015 7:28 pm

@brunopalermo Yes, but it doesn't do rotation, and I notice the white square continues to move when the platform changes direction. While that seems to imitate real life inertia, it isn't actually scripted to do that (as far as I can tell) and is therefore an undesirable side effect (due to lag, maybe?).
To make matters worse: In my game the ship has walls which have solid behavior, and the ship is controlled through custom movement behavior. The player is currently controlled through 8 direction behavior (while I experiment). I got the player to move around on the ship and stay with the ship by applying the same angle and acceleration to the player as I do to the ship. This works pretty good, but all the walls solid behavior lags behind the graphics of the walls while the ship is moving. So even though you see a wall where it's supposed to be, it won't stop you from moving until you are further aft of it (the exact difference depends on how fast the ship is moving).
B
11
S
4
G
1
Posts: 159
Reputation: 1,803


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests