Jump to content

Ray does'nt work on vegetation


Soamp
 Share

Recommended Posts

Hi,

In 2.32 vegetation does have physic bodies and collisions, thanks to josh.

But we've a problem, we use rays in our obstacle avoidance system. It seems that rays doesnt work on trees and vegetation.

Our character cant avoid trees by using rays.

Also according to wiki, rays only work on terrain and meshes.

Did anybody face same problem? Is there any way to solve this?

 

Thanks.

Link to comment
Share on other sites

I'm not using vegetation, but i have an idea...

 

You can make a few long and thin physic boxes which you attach to your player.

Just like the whiskers of cats. Set the third parameter of Collisions() to 2 (= no response collision).

That way the collision callback of your feeler will be called when it collides with something, but

there will be no visible collision. The rest should be identical to your solution with raycasts.

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

I'm not using vegetation, but i have an idea...

 

You can make a few long and thin physic boxes which you attach to your player.

Just like the whiskers of cats. Set the third parameter of Collisions() to 2 (= no response collision).

That way the collision callback of your feeler will be called when it collides with something, but

there will be no visible collision. The rest should be identical to your solution with raycasts.

 

Thanks, but it's not gonna work. Because rays are the way to check the character's heads up "whenever we want" but collisions check on every physics update. on the other hand if our charatcter's way is closed, we use some other rays to find a alternative way. with collision we have to wait for some physics update to use other rays and so on. so I think we cant use this method but thanks for your reply.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...