Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
animated.. I want to know how to use the cursor up, down or left, right and the character moves with animation ? ? |
||||
|
Just attach a behavior to the player character moved by keyboard.... And select the animation you wanted to be played for walk run and jump.... And now when you emulate the 2d touch overlay it will move accordingly with the animation... With cursor up and down player will show movement while with cursor lwft and right it will rotate... It all depends on how you setup your player... |
||||
|
Can you give me an example? |
||||
|
yes! sure here is the link to the example file it uses a cursor and animated soldier prefab..... which can be moved using the cursor! https://drive.google.com/file/d/... |
||||
|
thanks for your help, but i want to make a FPS game like counterstrike and the character move by cursor like the picture ! |
||||
|
Just make the hands, child node of the fps camera... And asign behavior on key pressed do something.... For example on pressing key 'up' change the animation of a scene node... Select the hands choose the desired animation.... Do same for other keys also... There may be more ways to do this... But its midnight and am a bit tired.... Will provide you with a ccb file tomarrow... With example of an fps game moving with the touch controlled cursor.. |
||||
|
I am waiting for your help every second :) This is animation file https://drive.google.com/file/d/1QC12jgZOmt7lyQ44i2zIE7Q6xEf_67J9/view?usp=sharing |
||||
|
well here is the another CCB file showing movement using arrow keys for an fps camera... all you have to do is to attach the game behavior, object or person controlled by keyboard to the animated player and change the value for move speed jump speed and run speed to Zero... that's all.. and the file you provided doesn't have textures and to use that file i have to edit the animations too with the animation editor as no action has been there... doing all this wil surely consume a lot of time ...so i used the pre-built coppercube animated soldier with a fps camera... https://drive.google.com/file/d/... |
||||
|
hi there ! An error occurred when touching the screen space.... https://drive.google.com/file/d/1DKRTdCA4lDZ4FjvG6HAiPIfOuPQ9nSEg/view?usp=sharing |
||||
|
What kind of error... I didn't find any error all controls are working fine.... |
||||
|
When you swipe up the screen .... the character performs the action shoot, instead of having to touch the button to hit |
||||
|
i read your ccb file and found that you are using on left mouse click shoot action... which is emulated as a touch on anywhere on the screen.. i have modified your apk and changed the left mouse click to... keypresed "G" to shoot and then using an overlay to emulate that key... here is the link to modified CCB and APK... https://drive.google.com/file/d/... |
|