please can i have a little help guidance in something, a about mesh curving , kind of look around but would like your advice
This object (the circle shape) is getting deformed like the yellow part, what do you advice me about it please?
Any script to see the mechanic or similar examples? (Attached gif)
I tried to see some but only works with mouse click ( I am very new to mesh binding )
Like What you watching here
thanks
I would start by describing the whole shape as list of points.
Then you should be able to move those points either via physics or "manually" (by doing Physics2D.OverlapPoint and some math during movement).
With that it's just a matter of constructing runtime mesh, there are tutorials on how to do that (I think Freya Holmér has one), just look for "procedular geometry" or similar.
Related
I am new to Unity and would like to be able to emulate the idea of 'digging' a hole in the 'earth' with a spade, at runtime and have the terrain slightly ahead of my camera lower slightly, then move that dug 'earth' into a pile somewhere next to the hole.
I have created a terrain using the preview terrain tools and now want to alter it at runtime a little like you see in this part of this video : https://youtu.be/l_2uGpjBMl4?t=2970
I want to be able to make a small 'dig' into my environment, just like a spade making a hole in the earth, and that state to then be something I can persist.
I then want to be able to move the 'dig' volume, i.e the 'earth' onto somewhere else in the terrain - literally imagine what happens when you dig a hole.
If I want to follow this guy's video, he is generating his terrain, and I am not sure how to apply his logic, because I would likely want to shoot a raycast from my camera, and where it intersects with the world, then alter the 'mesh' of my painted terrain, and then add to a 'pile' of earth somewhere else. I am not sure about just doing the piles of earth with just changing the height of the terrain, because there would need to be a volume associated with the 'earth' you have dug, so it's more of a object, than a terrain if you see what I mean.
I realise this is a bit of a braindump, but I am looking for direction and have done research these are the questions I would like answered, I want this to be a sounding board for whether my thoughts are on the right path, and if not, what is an optimal course for learning some techniques for achieving this.
You need to use Terrain.terrainData which contains the GetHeights and SetHeightsDelayLOD methods. SetHeights is also available, but is not as efficient. Check the documentation to see how they work!
I've been looking online for some guidelines for this and have had no luck.
I'm having issues with the destructible part of my terrain.
I currently have a script which fills in a 2d array with 1's and 0's and then continues to create a mesh and collider from this array.
The trouble I'm having is that I have no idea how to detect a part of the mesh which was hit with an explosion and then almost cut the explosion from the mesh. I'm struggling to find any hints on how to modify a runtime generated mesh.
All I've been seeing online so far are 3rd party assets, but I'd like to avoid using assets as much as possible.
I'm not asking for someone to provide me with a solution, rather, point me in the right direction.
I'm sorry if this explanation was lacking, but in short, is it possible to modify a mesh at runtime and if so, how?
So i try to make a adventure game and in one point my character need to eat some food and get fatter and fatter, smoothly every second.I've found only one solution in asset store.The MCS(Morph 3D) has this feature.But problem is i don't want to use one of their character.I have my on low-poly 3d character and i want to use this.
This is an example of what i need :
MCS Morph 3D
So where should i start? What should i look in to? Is there simple way to this or is it really hard?
Thanks already :)
This would normally be done with a frag/vert shader. You would modify the vertices of the mesh in the stomach area based on some value. This could be done really simply in which the distance of the stomach vertices from some given point located in the character's core would just increase based on your given value. I believe your thoughts are imagining something much prettier than this, but anything else would be much more involved for something that is purely visual. If you are not experienced with shaders, I would highly recommend purchasing a visual shader editor, such as Amplify (ASE) or Shader Forge. They make the jump into shaders much easier.
In general I wanted to make it in unity3d but I saw that in tutorials, they made it in blender.
This is what I did in unity:
I want to make this high cube hollow on the inside, and make a small door so that I will be able to walk inside the cube. Later on, I want to somehow add stairs but the problem now is how to make it hollow on the inside.
I saw in some places the suggestion to use blender so I tried this tutorial in blender:
Blender
But got stuck there after I checked the Add Mesh Extra Objects and clicked on Save User Settings. I tried then to click on the bottom on Add > Mesh but then I don't have Extra Objects. I have Extras objects like in the tutorial video.
Anyone my main goal is to make the high cube hollow on the inside with a small door on the bottom so I will be able to walk inside.
From what I know Unity3D has no 3DModelling by default (maybe there is something for that in store), so you need to use Blender or some other program (for example Maya). There is https://blender.stackexchange.com/ where you can ask same question (since it is not really unity3d related)
Maybe this will be helpful : https://blender.stackexchange.com/questions/5849/how-do-i-create-a-solid-object-cube
Overall what you could do, but it is not the est way - you can build a everything out of boxes yourself in Unity3D
Try use to boolean modifier. Take a look this tutorial:
Blender 2.6 Tutorial 26 - Boolean Modifier
I'm new to Unity3D, after several official tutorials I got some basic understanding about Unity3D. Now I would like to have fun with making my game.
I would like to have a sword cut an avatar into pieces. Like the game "Fruit Ninja", cutting fruit into pieces.
The specific effect I want: the cutting should be according to sword-cutting-angle, in other words, the breaking-pieces effect should vary according to every cut, that feels real.
My thought: since Avatar is made by Mesh Filter, if I cut the avatar by waist, into two pieces(upper body, lower body), I should use code to make two Mesh Filter to hold the two pieces.
I'm not expecting very detailed code, that could be a lot. I'm just wondering if I could get a clue about how to make this effect. Because I think "cutting avatar into piece" should be a general effect in game.
Thank you in advance :)
It's not easy as you may think...
Here you can get one approach to the solution:
it clones the object, finds a plane based on user variables, and flattens all the points on the other side of the plane onto it, then repeats this with the clone and the other side of the plane.
Other approach could come from using shaders, search for "cut away view shader".
I hope I have given you the start kick