# Tag Info

## Hot answers tagged webgl

3

If you set up an project with your idea, - what you want to archive as a final result. You also need to question yourself, how to structure different data. With the question you asked, everything can be a buffer. Just because their is no limit of what you can do, and what you what to be done as a project. A Buffer for Keyboard input or for previous mouse ...

2

Unfortunately there are many ways to do what your asking and from the info you have here it's very hard to tell what's going on. We're missing a lot of information. It appears to me that zoomCamera(); in onObjectsClick(event) is not an "Updated" but a single frame function. It appears to me that you are using lerp in a way that it's not really designed for....

2

If you look at the browser error console (F12) you will notice a lot of errors: WebGL: INVALID_OPERATION: uniformMatrix4fv: location is not from current program WebGL: INVALID_OPERATION: bindBuffer: object does not belong to this context It appears that one WebGL application tries to access stuff which belongs to a different WebGL application. How ...

2

I am assuming you are loading AssetBundle at Start. If so then your method DeactivateDistantTiles() is too expensive to be called in Update() since its been called every frame and your Coroutines are nested and in a for loop and telling Update method to delay which is wrong until and unless it is being validated properly. So you need to change your code ...

1

If you use things that are Framerate Dependent (Update or things with deltatime) then it can cause this. If you do not want the routine to be framerate dependent then you can use WaitForFixedUpdate() or put the movement in FixedUpdate() These have a fixed timestep loop

1

This is due to your Canvas scaling properties. By default the Canvas that you use doesn't scale with the resolution. So if you work in Unity with a small resolution (your game window size defines the resolution you're using, in your case it's a 4:3 ratio resolution but it seems very small), let's say 640x480 and try to play the game after building it on a ...

1

I would suggest that you sort these chunks into a lookup table, either a 2D array GameObject[,] or a Dictionary<int2, GameObject>. For each of your chunks you would then store it in your lookup on the index int2(floor(x / tileSize), floor(z / tileSize)). When iterating your chunks you only have to go over a certain number of indices, rather than going ...

1

In 2D it suffices to track a single angle value. If you want to animate rotation over time, you can include both an angle and an angular velocity, both signed scalars. float currentAngle = initialAngle + time * angularVelocity; float s = sin(currentAngle); float c = cos(cutrentAngle); In tandem with a local scale vector $\vec S$ and translation vector ...

1

I can't possibly cover everything, nor do I know every technique... in fact, I am unfamiliar with OpenGL 4.0 and newer. yet, I think I know enough to expand the way you think about this. However, have it clear thet there is much more to say about every technique, I am not going into technical detail, no code (it would be a lot) and very little math. I ...

1

You probably will want to use textures. Looking at the image you posted, I would probably make the door one texture, have another one for the lights, the wreath another, the pumpkins another, etc. That way the door can be a single quad, instead of the 9 or more it would take to draw that door using only geometry. In addition to simply mapping images to ...

Only top voted, non community-wiki answers of a minimum length are eligible