加了navmeshagent 停止的物体为什么会被推走

求助NavMeshAgent寻路问题_百度知道
求助NavMeshAgent寻路问题
我有更好的答案
能解释下其中的 Radius,看到了Bake中参数的解释,还有NavmeshAgent中的 Height 的含义吗我看了unity用户手册,Height,但是不是很理解
其他类似问题
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁求助,如何获取NavMesh对象,然后调用CalculatePath给itween让其寻路,而不用NavMeshAgent的setTarget()?-Unity3D-论坛-U3D在线
Unity3D在线
当前位置: ->
-> 求助,如何获取NavMesh对象,然后调用CalculatePath给itween让其寻路,而不用NavMeshAgent的setTarget()?
Unity3D 论坛 > 求助,如何获取NavMesh对象,然后调用CalculatePath给itween让其寻路,而不用NavMeshAgent的setTarget()?围观:2454 | 回复:23
香蕉魅力积分:9帖子:1
求助,如何获取NavMesh对象,然后调用CalculatePath给itween让其寻路,而不用NavMeshAgent的setTarget()?
葡萄积分:14帖子:1
android下读取xml ,把文件放在StreamingAssets这个文件夹中,
无法获取文件
葡萄积分:14帖子:1
请大神指教
香橙积分:3帖子:0
你明明放到StreamingAssets里了。。你干嘛还datapath
葡萄积分:14帖子:1
@静待晴天 直接“jar:file://”+"!/assets/"+"my.xml"??
葡萄积分:14帖子:1
我是看了momo的博客是这样写的,我试一下不用datapath
香蕉魅力积分:9帖子:1
求助,如何获取NavMesh对象,不是Agent
葡萄积分:14帖子:1
@静待晴天 直接“jar:file://”+"!/assets/"+"my.xml" 无法获取xml
葡萄积分:14帖子:1
原来这样就可以了,不管是pc还是android都可以用,就不知道ios上会怎样
北京大爷积分:56帖子:0
门老伯积分:32帖子:0
纸飞机的啊
免责声明:本站所有内容来源于互联网,如果本站部分内容侵犯您的权益,请您告知,站长会立即处理
Copyright Unity3D在线 All Rights Reserved.Theme by U3dOL 备案:京ICP备号-4 |SiteMap |网站地图 |百度统计| 联系我们NavmeshAgent.remainingDistance remains at 0 but the agent still moves and behaves correctly - Unity Answers
Navigation
Unity account
You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio.
NavmeshAgent.remainingDistance remains at 0 but the agent still moves and behaves correctly
I'm having a rather weird bug with Unity's navmesh system (I'm using Unity Free 4.2). Basically, the navmesh system itself works correctly, the unit goes from A to B and avoids the obstacles. However, sometimes if I try to log the remainingDistance variable as it moves it stays at zero the whole time. This is slightly annoying because I want to know whether the unit is moving so that I can draw its selectionbox at the right position (this is for a RTS game), and of course I'm using the &remainingDistance& variable to know when the unit has reached its destination. What really confuses me is that for two identical units (same prefab, same script, same everything as far as I can tell), one will have the correct variable and the other one won't. Even weirder, the units who are &bugged& still behave normally if I don't let them stop. What I mean is, I tell unit 1 to go from A to B. It will bug out and say that remainingDistance is 0 despite it clearly moving (let me reiterate that even when I say a unit is &bugged&, it still moves around as expected so it's not like the navmesh system itself doesn't work). If I wait until it reaches B and then tell it to go to C, the same will happen -except the position will be recalculated once, at the time of the click-. But if I give it another order mid-moving, then suddenly it starts working normally. So if I keep giving it new orders it somehow works, but if it ever stops once, then it's going to bug again until I give two orders in a row.
Now there are obviously hacky ways to solve it, such as treating any click as a double-click or issuing the command twice if the unit was not moving before. But it's a dirty hack and I'd rather solve the problem than hide it with a hack. If it's possible to solve it, that is.
Thanks in advance
Before you use the agent.SetDestination (POS) method, you may call the agent.ResetPath method, because I also encountered this problem, but I solved the problem.i'm chinese
Hint: You can notify a user about this post by typing @username
Attachments: Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
21 People are following this question.

我要回帖

更多关于 navmeshagent stop 的文章

 

随机推荐