Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
How to transform the received values of axes into float (UDP3)
#1
I was trying to fix some problems in my UDP3 and realized that I needed values from the players axis, for example, the client sends the positions in ushort to the UDP3 server, and for example to plant a bomb, it is necessary to float.

What would be the calculation that should be used to transform these values?

I received a value of the X axis in ushort, 52967, and it converted to float is -27.60938, but what is the calculation that has to be used to get to that result, both for the X, Y, and Z axis.
Ответ
#2
This half float. SharpDX.Mathematics can be used for C#

[SRC="csharp"]var x = Read<ushort>();
var y = Read<ushort>();
var z = Read<ushort>();

Vector3 position = new Half3(x, y, z);
[/SRC]
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  UDP3 MomzGames - Auth Protected (v42) vinne 0 3,471 01-08-2020, 03:02 AM
Последний пост: vinne
  [Source] UDP3 MoMz Auth Protected vinne 0 3,063 01-08-2020, 03:01 AM
Последний пост: vinne
  UDP3 Helicopter animation nikolen 0 2,121 09-01-2019, 08:46 PM
Последний пост: nikolen
  [Help] Point blank UDP3 ON indows 0 1,946 07-04-2019, 03:41 AM
Последний пост: indows
  UDP3 Grenade problem zOne62 5 2,168 12-16-2018, 12:03 PM
Последний пост: zOne62
  UDP3 POSITION ERROR Comandante9901 13 5,441 10-10-2018, 09:20 AM
Последний пост: ChunkyHunt
  help me UDP3 DeathDataForClient Event Id 2048 bmzproject 2 1,731 07-20-2018, 07:04 AM
Последний пост: battleBugado
  UDP3 answer ManuelDev 3 2,110 07-03-2018, 04:27 PM
Последний пост: bmzproject
  UDP3 Send-back packet ManuelDev 3 1,948 06-29-2018, 12:18 PM
Последний пост: ManuelDev
  pay for udp3 Light 0 1,553 06-29-2018, 02:04 AM
Последний пост: Light

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)