paulo

Rotate player according to the ground slope

Recommended Posts

Hi,

I'm creating a game that player can walk over terrains with lots of slopes.

How can I make my player rotate accordingly to the angle of the slope?

 

This is how it's currently working:

bUfl0mkDRD6q1LHeE1_ZKA.png 

 

And this is how is must work (I've changed the angle manually):

ZUqwkKT-RxqvXYVIum4PEA.png

 

I'm using Box2D plugin to generate the terrain accordingly to an image. That's the reason of all these bodies.

 

Thanks!!

Share this post


Link to post
Share on other sites
5 minutes ago, Mythros said:

PLEASE do this in Babylon.js in 3D... Allow the player to slide down steep slopes

<3

It's a project for my university course. I need it in Phaser.  :mellow:

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

  • Recently Browsing   0 members

    No registered users viewing this page.