witawat Posted April 18, 2012 Share Posted April 18, 2012 Hello i need controller charter by mouse not move charter by key board ( a, d ,w ,s ) can click on map and move charter to point ? Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted April 18, 2012 Share Posted April 18, 2012 Look at the wiki entry on Input These commands give you access to the keyboard and mouse. Once you can detect the mouse buttons then the rest should be straight forward. Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
AggrorJorn Posted April 18, 2012 Share Posted April 18, 2012 Use a pick to to determine the location you want to go to. Rotate your character with LookAt towards the picked position. Move forward till the picked position had been reached. 1 Quote Link to comment Share on other sites More sharing options...
witawat Posted April 18, 2012 Author Share Posted April 18, 2012 Use a pick to to determine the location you want to go to. Rotate your character with LookAt towards the picked position. Move forward till the picked position had been reached. u have code ? Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted April 18, 2012 Share Posted April 18, 2012 First of: which programming language? Here are some C# examples: Picking snippet: TVec3 pickPos; if (LE.MouseHit(Mousebuttons.MOUSE_LEFT)) { if (LE.CameraPick(out pick, camera, new TVec3(LE.MouseX(), LE.MouseY(), 1000), 0, 0, null) == 1) { pos = pick.position; } } Looking at it using: PointEntity() TPivot pivot = LE.CreatePivot(); LE.PositionEntity(pivot, pickPos) LE.PointEntity(characterModel, pivot, 2, 5, 3 ) //2 is the Y axis, 5 is rotation speed, 3 is roll Moving the entity towards the picked position: LE.MoveEntity(characterModel, new TVec3(0,0,5), 1) //move on the local axis 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.