2ima Posted January 3, 2017 Share Posted January 3, 2017 using reference i found how to make entity movement and got such: move = window->KeyDown(Key::W) - window->KeyDown(Key::S); strafe = window->KeyDown(Key:) - window->KeyDown(Key::A); //Making sure that movements is normalized so that moving forward at the same time as strafing doesn't move your character faster normalizedmovement.z = move; normalizedmovement.x = strafe; normalizedmovement = normalizedmovement.Normalize() * movespeed; //Adjust and set the camera rotation playerrotation.x += mousespeed.y*sensitivity / 10.0; playerrotation.y += mousespeed.x*sensitivity / 10.0; entity->SetInput(playerrotation.y, normalizedmovement.z, normalizedmovement.x, jump, crouched, maxaccel); and entity is not moving! maybe somebody more experted than me can see my mistake? Checked out FPSplayer.lua, looks like just myne. Kinda magic) Maybe smb has more sufficient metod of entity movement? Thanks beforehand!) Quote Link to comment Share on other sites More sharing options...
macklebee Posted January 3, 2017 Share Posted January 3, 2017 Hard to say with the code provided. Does the 'entity' have a mass greater than 0? Does the 'entity' have its Physics Mode set to Character Physics? Have you tried printing out the values of 'normalizedmovement' X & Z values? What's the 'maxaccel' variable set to? 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
2ima Posted January 4, 2017 Author Share Posted January 4, 2017 entity mass is 50, Physics Mode and Character Physics is set properly, 'normalizedmovement' X & Z values is set and working... maxaccel is maximal acceleration to disable enitity's element race. The thing is in what when I try to use constant values instead all of those still nothing 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.