ricardojmendez / UnitySteer

Steering, obstacle avoidance and path following behaviors for the Unity Game Engine
https://numergent.com/tags/unitysteer/
Other
1.21k stars 276 forks source link

SphericalAvoidance problem #10

Closed Kahl84 closed 11 years ago

Kahl84 commented 11 years ago

I've used your examples in test cases folder and noone works with spherical repulsion. I'm trying to set up a biped with steerforpoint and avoid obstacles. Any guess?

ricardojmendez commented 11 years ago

Hello Kahl,

I haven't really had time to retrofit the SteerForSphericalObstacleRepulsion behavior to the other examples, which is why it's still only on the development branch. What's the behavior you're observing? It might just be that the vehicle has too high a velocity and too low a turn speed for the behavior's correction to be useful (it knows it should turn, but can't).

I'd start by uncommenting //#define ANNOTATE_AVOIDOBSTACLES so you can see the forces that the behavior is attempting to apply on the editor view.

Kahl84 commented 11 years ago

Hi Thanks for the reply! I will try and let you know! :D By the way the capsule head toward the target and collide with the obstacle. . .

Kahl84 commented 11 years ago

http://www.youtube.com/watch?v=0nkW8x3N4ko as you can see I've tried different thing but the doesn't works at all. Can I send you my project so you can tell me if there is a way to make it works or must find another way?

ricardojmendez commented 11 years ago

Sure, but I can't promise a response time - I am currently in the middle of the Hairy Tales launch and my attention is already being pulled in multiple directions. You can use ricardo at the address on my profile's URL.

madsvcarlsen commented 11 years ago

I have the same issue. The obstacles are just not at all being detected for some reason.

madsvcarlsen commented 11 years ago

And it is not applying any forces either, when doing #define ANNOTATE_AVOIDOBSTACLES

ricardojmendez commented 11 years ago

If you are not seeing any forces at all, you may have a detection problem.

madsvcarlsen commented 11 years ago

Yes, that is what i am saying, but the radar is attached, and the appropriate layers have been assigned and selected. But still no detection. I started a UnityAnswers thread for help as well, as i can't see why there is no detection whatsoever. http://answers.unity3d.com/questions/344842/unitysteer-radar-issues.html

ricardojmendez commented 11 years ago

Answers would indeed be a better place for that MrPyro, since it's a different issue from what kahl was asking, and likely not a UnitySteer bug.

uncasid commented 11 years ago

I am also having this same problem.

Can this same feature be used for vehicles? I see where you are excluding them, so I added them back in with no change in activity.

uncasid commented 11 years ago

Actually.. I just figured it out.. the problem is that the detectable object base for a vehicle is never actually calculating the correct bounds. I added the "CreateDetectableObject" method from the class "DetectableObjectCreator" and called it on awake.. this seemed to have solved my problem (along with making sure vehicles made it into the obstacles list)

ricardojmendez commented 11 years ago

Perhaps this bears further documentation.

Was it the case that the game objects had a detectable object, but it just had the default radius of 1? Or that it didn't, and the solution was to add a DetectableObjectCreator?

uncasid commented 11 years ago

Yeah, the radius was 1, and there was no way to adjust it in the inspector. I just used the part from the DetectableObjectCreator on awake and it computed the bounds for me.

Maybe it is a use dependent thing; in my use case, I didn't want meshes to intersect during run time.

ricardojmendez commented 11 years ago

Yeah, the radius was 1, and there was no way to adjust it in the inspector.

That is odd, the DetectableObject component has a custom editor (DetectableObjectEditor) for setting the radius. Can you confirm?

protodeep commented 9 years ago

Hi, Having difficulty finding an example of a flying steering entity avoiding wall-like obstacles or the ground. Is there a simple way to do that?

ricardojmendez commented 9 years ago

Protodeep,

That's not an issue of steering, but of navigation. You can use SteerForNavmesh, although I did not write it myself.

protodeep commented 9 years ago

OK, I'll dig in on that. Thank you, Ricardo.

Looking forward to sharing what I'm working on soon.