I'm working on a Unity project with a city. The player controlls a flying camera and can move around freely. It's important, that the player is able to see the interior of the buildings. Therefore I need to hide the walls from my houses, when the camera is near them.
As the player can rotate the camera, only the 2 closest of the 4 walls should be hidden.
preferably, I would only hide the upper 2/3 of the wall.
What is the best way to achieve this?
Should I edit the blender models? (Can they get wall-checkboxes or so?)
Should I export every wall individually and put them back together in Unity? - As there will be over 100 houses, I could imagine this option getting quite laggy.
Should I hide them by manipulating the mesh-renderer in Unity?
Im not an expert for unity or blender, as you might guess. So I'm really thankful for any help!
Thank you a lot for your time and your effort! :)
Related
I am making a 2D top down racing game in Unity
I have made 18 tracks, all with tilemaps and colliders attached to those tilemaps.
I am trying to introduce a new system, let me explain.
I have 4 different FULL tiles: Road, Trackside Grass, Grass, Water.
I also have many tiles that are e.g. half road half trackside grass to make certain areas smooth
I can't separate tilemaps because of the half/half tiles.
How can i try to flag certain areas? Or am i gonna have to spend months redesigning all the systems?
I don't want to redesign the system. I tried the tilemap separation on 1 of the tracks and the problem with half/half tiles happened. Please try to help me, i would be very gratefull
i hope someone helps me its been a while
I'm developing a game in Unity 3D. The basis of the game is that it takes place in a room, and clicking on different objects launches different 2D minigames. I want to implement a floor-sweeping minigame, where you click on a broom, and it brings up a picture of a floor with dirt on it, that you use your mouse to "clean", like how you clean a window in House Flipper.
I'm having difficulty figuring out how to implement this in 3D. In the research I've done, I found ways to implement this in 2D using sprite masks, but this doesn't appear to be a feature in the Unity 3D UI elements. How would this have been implemented in House Flipper? And what's the simplest way to approach doing this in Unity 3D?
Any help or pointers to subjects to do more research on would be greatly appreciated. Thanks.
So I have been working on this little project, and I ran into a problem that I would like to fix before I continue. I have a wall that's part of the tile map, and I need to hide the characters obstructed by the wall, when they are behind the wall, without hiding them at all when they're in front of the wall. If I set the order in layer of the sprite lower than the layer of the wall, then it will look right when the sprite is behind the wall, but not correct if the sprite is in front of the wall. If the order is the same or higher than the wall, then the opposite is true, looks fine in front, doesn't work behind. To show exactly what I mean:
When the sprites order in layer is set lower than the wall
when the sprites order in layer is set to the same or higher than the wall
I know of a few potential solutions, but the solutions in mind are not very good for reasons of complexity/difficulty. Like many of my problems here, I suspect theres an easier way, but also like many of my problems here, I dont know enough about unity to be aware of it. Ive searched around the unity documentation, but im not really sure what is applicable to my situation. Any pointers?
figured it out. The wall and sprite need to be on the same order in layer, then go to
Project settings > graphics > transparency sort mode: custom axis > x 0, y 1, z 0. Then go to the wall in the tilemap, in the tilemap renderer component, set the mode to individual.
I'm creating a game where you can play as an ant and can walk on any surface. The problem is that I'm really new with unity and can't seem to be able to find a code that can do this. thanks!
I would go with something such as this:
make walkable surfaces with the tag "walkable", and apply it to walls etc.
make your ant not affected by gravity when interacting with one, or change your gravity direction to be perpendicular to the wall.
I've developed an airplane 3D shooter game. In this game, I want to make my plane shot a bomb. When the bomb gets to the enemies it will explode and give damage in the area of explosion.
I have already searched for a tutorial to make this code and the animation of explosion. But I couldn't find it. Please tell me about something that could solve this problem. I'm developing my game using C#.
For the explosion animation, you could use a particle system. There are many pre-made ones in the Asset Store, such as this one: https://www.assetstore.unity3d.com/en/#!/content/42285
For detecting what is affected in the explosion's area of effect, do a SphereCast (https://docs.unity3d.com/ScriptReference/Physics.SphereCast.html) from the point of impact and then do whatever you want with any of the objects touched by the sphere.