Sign in to follow this  
P0jahn

A solid movable platform

Recommended Posts

I want to create a solid movable platform for my game. If you stand on it while it moves, you will follow it. This isnt hard to implement if the platform is restricted to vertical and horizontal movments. But the platform can move in any direction, there is no restriction at all. So the replacement of the character that is touching the movable platforms becomes tricky.

 

Some hints how I can implement this?

Share this post


Link to post
Share on other sites

If you add the velocity vector of the platform to the position of the character, that should keep it in the same relative place on the platform.

Share this post


Link to post
Share on other sites

That is not a suitable solution for my game. 

 

Instead, I was thinking about using normalized vector(normalize its current position with its previous position) to calculate what direction the solid platform was moving in and look where subject is located. Then move him to the correct position with the help of the normalized vector.

 

The problem is I am not good at this and I am not even sure that this will work.

Edited by P0jahn

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this