Jump to content

  • Log In with Google      Sign In   
  • Create Account


Player Movement


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 white_waluigi   Members   -  Reputation: 111

Like
0Likes
Like

Posted 27 May 2013 - 06:56 AM

i've got the following Problem:

im making a 2D not Tile-Based game with Collision Lines in all directions and sizes. Now when the Player moves along a 40 degree Line for example, his movment speed decreases dramaticaly, so i set down the Gravity. but then if the player moves in the opposite direction, he flies of the surface.

 

How could i solve thies Problem?

I thought about implementing a System, that, if the player is on a surface, lets him move along the surface, but that caused me a lot of other problems. How do other People solve this kind of Problem?



Sponsor:

#2 Kjell Andersson   Members   -  Reputation: 372

Like
0Likes
Like

Posted 27 May 2013 - 10:43 AM

You say that you have gravity - is it a top-down view or a side view? How is the gravity affecting your movement?

Can you be a bit more specific on how you currently calculate your movement?



#3 white_waluigi   Members   -  Reputation: 111

Like
0Likes
Like

Posted 27 May 2013 - 12:08 PM

its top down and the gravity is alawys 1m/s, so the player is always falling, but the player gets on the surface by resolving the collision. Movement is 1 m/s right now which means the effect drops by 45 degrees.



#4 Inferiarum   Members   -  Reputation: 723

Like
0Likes
Like

Posted 27 May 2013 - 12:20 PM

How do you resolve the collision?

Lets say the player is penetrating a plane.

If you push the player out in direction of the plane normal it should slide down slopes on its own, which is probably not what you want.

If you push the player out vertically, it will stay in position and gravity should also not affect the movement speed.



#5 white_waluigi   Members   -  Reputation: 111

Like
0Likes
Like

Posted 27 May 2013 - 12:40 PM

i avoided the sliding by adding fraction

 

so your telling me top just resolving the collision vertically or horizontal?

k ill try it out






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS