Jump to content

[solved] Rotate player correct on rotating platform


Hans
 Share

Recommended Posts

Hi @all again,

I have a huge problem with rotation. I hang about one week on this problem. I perpared a playground: http://playground.babylonjs.com/#7CPXT

I have a player with a front side. You can see the front side with the aid of the nose mesh. It is the player view direction. The player rotates with the camera rotation. The player stand on a platform. It is possible to rotate the platform with the keys V, B and N.

My achived behavior is: The player stand ALWAYS orthogonal on the platform indifferent the platform is rotating AND the player can rotate normal  by himself in his own Y-axis direction by rotating the mouse.

In the playgound you can see my try with the nearest similar behavior. It seems to work, but how you see in the picture it dont work correct.

I realy dispair :wacko: I am open to all suggestions

wrong.png.580da404ec35e00f2f54362c7cde7e14.png

 

Link to comment
Share on other sites

Thanks. Your demo has a strange behavior somehow (The player is flies ). I think its up to an alpha BJ update?

Edit: now your demo works again

I will try and play around with it.

Edit: Your way seems to work for me. Thanks a lot! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...