Download

complex "world to meters" scaling at run time offset problem...

For a game concept im working on i want to let the player adjust their “world to meters” scale on the fly while walking around at the same time.

The problem is that “world to meters” works by reducing coordinates by the % of scale, thus “sucking” the player to the 0,0,0 of the tracked space location, as seen in this picture:
b06575ba039b2082caf5a8fb6ea90a90a618d22f.png

What i need to do achieve is to move the pawn the right amount of distance in order to keep the player located at the location he’s currently standing at.
This is a variable that needs to be calculated as a “AddActorWorldOffset” value that can be used to adjust the pawn’s location every tick.
The effect is similar to how you’d use GoogleMaps, where you can hover your mouse over one city, zoom in/out and your mouse would still be located over that same city

This is a diagram of the problem with only one dimension, with the tracked space resizing (with the world to meters variable changing) and moving the required amounts.

  • the last value should be 150% not 50…

A calculation i worked out on paper was:

(World to meters Tick 1)-(World to meters Tick 2)= Variance
Variance * 0.01 * HMD Coordinate = amount that the pawn needs to move to compensate
1186161ffe723135026a6b2d78460cb56f3e30cc.png

However this causes the pawn to stay relatively in place at distances near the origin of the world, but the further you move out the more the player is moved while scaling takes place.

Is there a proper formula/solution to solve this?

I would also like to know this. Vieviev manage to achieve this effect in their ‘VRGirlz’ (NSFW) demo’s very effectively.

bumping this, spent 2 days trying to find a calculation that would do this. lol.

Been searching solution for properly scaling the world for weeks now. Would love to see where this thread will lead us to.