cassius Posted November 20, 2015 Share Posted November 20, 2015 In my third person game my main character has a sword fight with an enemy.The fight anim starts when the characters are close to each other ( using GetDistance ) The problem is the main character can be rotated with mouse so that its back is facing enemy, but the swordfight anim continues. This looks stupid. I tried point command , but it seems to be overridden by mouse rotate and keyboard commands ( like W and S) Any ideas anyone> Thanks. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
f13rce Posted November 20, 2015 Share Posted November 20, 2015 You can try to disable player movement while it's doing the animation. Having a boolean to check whether the player can move or not should do the trick here. Quote Using Leadwerks Professional Edition (Beta), mainly using C++. Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz Previously known as Evayr. Link to comment Share on other sites More sharing options...
cassius Posted November 20, 2015 Author Share Posted November 20, 2015 I have tried that and it makes the fight scene very static and boring to watch.I want the characters to be able to knock objects over, jump on tables etc during fight scenes. One thing I have done is play the anim only when the characters are VERY close together. I will also slow down the move speed of enemy character which will make it unable to catch up with main character when it runs away. Thanks for reply. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Marcousik Posted November 28, 2015 Share Posted November 28, 2015 I had this question in my FPS game: The fighter should stop shooting if not facing the player. Well it's makable, just calculate the rotation of your character, and determine so if facing the opponent or not. For example between -45 and 45 he swings the sword, and if >45 or <-45, then SetAnimation(somethingElse). ok ? Quote Link to comment Share on other sites More sharing options...
cassius Posted November 28, 2015 Author Share Posted November 28, 2015 Yeah I will try that. Its the main character that is the problem. It can turn its back to the enemy but still do the fight anim. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ 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.