- Home /
Resizing cube mesh
Hi,
I'm trying to make a room with walls and a navmesh. that's basically it. I have the terain in place and now to make a wall, I created a cube collider and clicked to edit the collider and stretched it into a wall shape. The problem is, the mesh rederer didn't change with it. So the NavMesh isn't following my new wall, its using the original cube.
How can i make the mesh/mesh renderer/collider/NavMesh be shaped like a wall in my room?
I know this is a super elementry question, sorry. I've been working in 2D mode for a while and only starting to dabble in 3D. I'm having trouble finding this answer in the manual because i think it might be TOO basic.
Thanks
RJ
Answer by HarshadK · Mar 23, 2015 at 01:05 PM
Instead of changing the collider, scale the cube object itself. Since if you scale the gameobject Unity will scale the collider along with it.
Yes. You can do that in Scene View also by selecting the scale option. Both are same.
Thanks so much. do you think this is the best way to go about creating the nav mesh I was talking about in my question? Ideally the walls would be transparent. I have an orthographic camera pointing straight down. and the floor is a large PNG. I would like to be able to 'draw' walls on the PNG and put invisble collider walls on top of them.
Yes. Seems like a good option if background PNG is not going to scale with screen aspect ratio changes.