Jump to content

how to move player in facing direction?


hulahula
 Share

Recommended Posts

Hello.

Sorry in advance for my bad english language. :D

I am new in babylon.js and I tried some things and i relly like it.Now I want to make RPG game when player will be move forward with "w" and  will go to  mouse pointer direction but I can´t to figure out. Always redBox (player)  wierdly go in to opposite duraction and in a case of collision i don't have any idea how it works :D 

here si my project : http://www.babylonjs-playground.com/#3F5YVW#2 

 I will be so glad if you can show me way how to reach a results . :)

Link to comment
Share on other sites

Sorry for my  inactivity, I had to do same staff in my  college.  :D 

I looked to your link and It is so cool but in my exampel it worke really wierdly . I don´t  konw why ... in my exampel  collision   chceks  sooner and in some position chceks  later. Gravity  is relly sensitive  when  a  var gravity = 1 ;  - shoot redBox to the univers  if  var gravity =  0.9 ;  - redBox will vanish under gound.  

Exampel  :  http://www.babylonjs-playground.com/#3F5YVW#4 

 

 

 

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...