New answers tagged

-2

If you literally want to gather a list of points, it may make more sense to just use raycasts from Camera1's position to determine those points. To do this, you could instead have Camera2's frustrum be a collider, use Physics.RaycastAll from Camera1's position to each collision in the Camera2 collider, and the points you're looking for would be all the ...


1

One way it to make seams everywhere you want a sharp corner. In fact you are going to need to do that anyway in the game if you want to use a a GPU for rendering. With seams I mean storing the vertexes on the edges you want sharp twice (one for the polygons on each side of the edge).


1

The only way I can think of preserving sharp edges using an algorithm is to have some kind of threshold of maximum angle between normals. But this is kind of auto generating smoothing groups anyway. I also cant see this being effective unless your geometry is a mixture of very smooth + very angular. Essentially when you render a tri you would have 3 verts ...


2

The only possibilty you have is to add the vertex twice, if no collision is generated, this will have almost no performance impact, if you do want collision, subclass the UProceduralmeshComponent yourself and override GetPhysicsTriMeshData to fill the collision array with non-duplicated vertices


0

I got something working more or less using trilinear interpolation (Wiki). When the marching cubes vertex is sampled, I look for the neighbouring data in my voxel data, use this data for interpolation described in wiki. Example: in(3.14, 0.4, 1) x0 = 3, x1 = 4 y0 = 0, y1 = 1 z0 = 1, z1 = 2 which are used directly in wiki algorithm. Heres an example ...


0

I don't know about using a KD Tree for this but to find holes in a triangular mesh you must find all the border edges of the mesh which belong only to one triangle. One algorithm would be to iterate over every edge of the mesh and maintain a set of border edges. For every edge, if the edge is not in the set, then add it. If the edge is already in the set, ...


2

You could modify the existing collider on the mesh so that it is less "realistic" (aka less form-fitting) but better blocks the area in question. You could also just remove the collider altogether and place a box collider in it's place that completely encompasses the mesh and the air above it, so that the player cannot jump on it. Both of these examples ...


0

The appropriate way is as you want to avoid. That is to add a tiny rigid mesh to the object and thus, the scene. It wouldn't need to be more than a couple hundred bytes I'm guessing. That being discounted, you could capture the point from where the player jumped and move them back in that direction by other means. That would be ugly and will "feel" buggy ...


1

Option 1: Draw the mesh as per the current state from the initial player position to the current position. For this, create quads for all fully-traversed segments, and then determine which line segment the player is currently on, and how far (playerSegmentRatio=(0.0->1.0)) the player has travelled along the length of that segment. For that segment, draw ...


1

Triangles have a direction in which they face. They are transparent from the other direction. Which direction each triangle faces is determined by the order in which you state the three vertices it consists of. When you would like the triangle to be visible from the other side, pass the vertices in reversed order. If you would like them to be visible from ...



Top 50 recent answers are included