[Point Blank] How to transform the received values of axes into float (UDP3) - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Пользователи Календарь Все разделы прочитаны
Вернуться   Форум администраторов игровых серверов > MMO > Point Blank (Piercing Blow)

Point Blank (Piercing Blow)
Общие вопросы по написанию эмулятора. General questions on developing emulator. При поддержке: Lucera 2 - разработка Java Interlude

Ответ
Опции темы
Непрочитано 01.05.2017, 23:02   #1
Пользователь

Автор темы (Топик Стартер) How to transform the received values of axis into float (UDP3)

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.

Последний раз редактировалось TheBestGuy; 02.05.2017 в 03:16. Причина: Some problems with translate
TheBestGuy вне форума Ответить с цитированием
Непрочитано 08.05.2017, 07:17   #2
Аватар для PROGRAMMATOR
Администратор

По умолчанию Re: How to transform the received values of axes into float (UDP3)

This half float. SharpDX.Mathematics can be used for C#

var x = Read<ushort>();
var y = Read<ushort>();
var z = Read<ushort>();
 
Vector3 position = new Half3(x, y, z);
 
Code: C#
__________________
composer require laravel/framework
yarn add vue
PROGRAMMATOR вне форума Отправить сообщение для PROGRAMMATOR с помощью ICQ Отправить сообщение для PROGRAMMATOR с помощью Skype™ Ответить с цитированием
Сказали спасибо:
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 
Опции темы

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход

Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
[Piercing Blow] Object Status From Room (UDP3) bola Point Blank (Piercing Blow) 5 30.12.2016 18:50
[Point Blank] PointBlank ongame udp3 server Comandante9901 Point Blank (Piercing Blow) 3 04.12.2016 17:39


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 11:59. Часовой пояс GMT +3.

Вверх