Jump to content
  • Advertisement
Sign in to follow this  
P0jahn

A solid movable platform

This topic is 1925 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!