How to copy other object movement


Hello, how do i create object 2 that will be in almost in center of the map, then how do i make object 2 move around minimap in lower scale like player move around map

Its not map tutorial, i dont need object 1 icon on the map, i need 2nd object in almost center of map and make it copy movement in lower scale.

Isn’t this just basic minimap functionality?

There’s like ten billion tutorials for this out there, and underneath it all it is simply a rectangular rescaling transform: you scale from one rect (your world) to another rect (your minimap).

If it’s more than a simple minimap coordinate transforms, then explain further.

No, i doing it for parallax, i need 2nd object to copy movement of 1st object, not 1st object as icon on map

In that case use whatever movement moved object 1 and move object 2 accordingly.

If something else is moving object 1 (such as a Rigidbody) then you will need to observe and compare movement each frame and use that.

Im trying your solution about simple map, cam you help me, please?

All tutorials i see is for 3d game, the few that i found is minimap locked camera on player

If your game moves through 3D and you want the minimap from the top, just disregard the y value.

In other words, from 3D to 2D for a top-down minimap:

x → x
z → y

Now from (x,y) above you can make your 2D rectangle-to-rectangle reduction and you have your minimap position.

If you have a NaN that means you divided by zero. Don’t do that. If you have code that computes a divisor, guard that code against being zero before blindly dividing by it.

Issues with NaN and Infinity:

1 Like