# Tag Info

1

My answer contains the following assumptions: You want to get the the x,y-coordinates in order from the upper left to the bottom right, even if your viewport overlaps the map. If it overlaps, you want to look at the repeated map. Your viewport does not exceed the size of the map. var mapDimensions = {x: 20, y: 20}; // Width of the map var ...

0

I would recomend you to refactor your code in a more modular way, i did once a ScenesManager module, give it a peek.

0

Talking about online games - all logic/collision/actions should be manager on server. (because user is a cheater by default) I understand that maybe one single unit jump with 50-100ms ping will looks weird (as websockets guarantee package delivery, but also a bit slower because works under http). So let's imagine jump logic: user press space (or up) to ...

0

Add some random points Repell points located too close to each other Add some points along the edges Do Delaunay Triangulation on all the points Done

2

First , your polarToComponent(magnitude, angle) { return { x: magnitude * Math.cos(angle), y: magnitude * Math.sin(angle) }; Called for each ball at start time, introduce a numeric error. So you must calculate the total velocity before starting simulation and compare with that instead of 30. Second your function checkCollisions() ...

1

The gist of CCD is really nothing dazzling. Here's the description of a serial set-up (a chain of links and joints) you have an assembly of N joints and N links the first joint is called the root joint and has index 0 joint i defines the frame where the rigid body for link i has its geometry described in (it's easier since people usually select a local ...

1

A world-space canvas is rendered as a 3d plane-mesh in the game-world, which means it is overlapped by other 3d objects. But to solve this problem you don't need a custom shader. You can do it with multiple cameras with different culling masks. When you have multiple cameras in your scene, each camera will be rendered separately. The culling mask decides ...

0

You're going to need a custom shader for your World Space UI objects that has it's Render Order to Overlay and has ZTest turned off. Also your World Space ui does not have to be a child of a screen overlay canvas( that's not how it works) This is a copy of the Default UI shader with the necessary changes. Should do the trick. Just make a material with this ...

Top 50 recent answers are included