Speed increase when ApplyForce and LinearImpuls apply both using in Game

限于喜欢 提交于 2020-01-06 07:53:17

问题


In my game i am using LinearImpuls for jump player body and ApplyForce for movement left-right .But the problem is that when player jump at that time if movement occur then player speed so increases its just look like running on air.

So what to do to resolve this problem??

Thanks in advance


回答1:


I think keeping a check by boolean variable in code that at one time only one action can be performed either jump or moving left and right will solve the problem until and unless it does not affect your required movement.



来源:https://stackoverflow.com/questions/12244771/speed-increase-when-applyforce-and-linearimpuls-apply-both-using-in-game

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!