Ray casting on a plane geometry only works from on direction
Asked Answered
F

0

0

I'm using plane geometries as walls in a game. I'm using ray caster to provide the player from moving through them. The problem is that planes only works one way. When the player comes from the "front" side it works but when it comes from behind it moves through.

Cube and sphere geometries works from any directions so my ray caster function seems to do the job.

I have set material to be double sided but it doesn't help.

Does any one know about this issue? How can I make the plane using both side?

Fatherinlaw answered 29/11, 2016 at 10:58 Comment(5)
Can you add the code you have to your question? Namely the ray caster function?Cubical
In simple words: Raycaster detects only front sides of faces, it's not an issue, it's normal behaviour. If you need a proper wall, then create a thin box.Alltime
Ok. so if i make a copy of plane geometry, flip it and merge it together will it work? The reason the box doesn't work perfect it 'cos I want to alter some vertices in the plane.Fatherinlaw
Yes, it will work. But also I see no obstacles to alter vertices of a box.Alltime
I'm trying to save some faces, if I need say 10x10 faces on the front and the back side and having the same number of faces on the other for sides would be unnecessary. But thanks for your quick answer :)Fatherinlaw

© 2022 - 2024 — McMap. All rights reserved.