hulahula Posted October 22, 2017 Share Posted October 22, 2017 Hello. Sorry in advance for my bad english language. 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 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 . Quote Link to comment Share on other sites More sharing options...
Raggar Posted October 22, 2017 Share Posted October 22, 2017 This is one way of doing it: http://www.babylonjs-playground.com/#3F5YVW#3 Collisions depend on whether you need a real physics engine, BabylonJS' collisions or you own implementation. I think physics are a bit overkill for a simple RPG, though. hulahula 1 Quote Link to comment Share on other sites More sharing options...
hulahula Posted October 22, 2017 Author Share Posted October 22, 2017 Thank you very much @Raggar Now I understand why it didn't work . And regarding collisions I wanted try moveWithCollisions : https://doc.babylonjs.com/tutorials/cameras,_mesh_collisions_and_gravity but now I must find out what will be better. Quote Link to comment Share on other sites More sharing options...
Raggar Posted October 22, 2017 Share Posted October 22, 2017 Could work: http://playground.babylonjs.com/#J89UGC#1 I wonder what the performance gains are, compared to using a physics-engine. Quote Link to comment Share on other sites More sharing options...
hulahula Posted October 27, 2017 Author Share Posted October 27, 2017 Sorry for my inactivity, I had to do same staff in my college. 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 Quote Link to comment Share on other sites More sharing options...
hulahula Posted October 29, 2017 Author Share Posted October 29, 2017 ok it is solved GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.