问题描述
我正在使用 C# 从 Assetto Corsa 模拟/游戏中提取不同类型的数据。
我已经设置了一个简单的控制台程序,它只是打印出我想要的数据。 代码如下:
contract TestNFT is ERC721,Ownable {
struct Child {
string name;
}
struct Father {
string name;
Child[] childs;
}
mapping(uint256 => Child) private _childs;
uint256 nextChild = 0;
mapping(uint256 => Father) private _fathers;
uint256 nextFather = 0;
constructor(string memory name,string memory symbol)
ERC721(name,symbol)
{}
function mint(
string memory name
) public onlyOwner {
_safeMint(msg.sender,nextCharacter);
_childs[nextChild] = Child(name);
nextChild++;
}
function mintFather(string memory name) public onlyOwner {
_safeMint(msg.sender,nextClan);
_fathers[nextFather] = Father(name,new Child[](0));
nextFather++;
}
function insertChildToFather(uint256 fatherId,uint256 childId)
public
onlyOwner
{
Child memory child = _childs[childId];
_fathers[fatherId].childs.push(child);
}
}
上面的例子只是打印出气温并且工作正常。
我想查看的其他数据是 TyreContactNormal 值,文档中描述如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using AssettoCorsaSharedMemory; //referenced to a DLL called AssettoCorsaSharedMemory.dll
using System.IO.Ports;
namespace AC_console_testing
{
class Program
{
static void Main(string[] args)
{
AssettoCorsa test = new AssettoCorsa();
test.Start(); //Starting the connection with Assetto Corsa
test.PhysicsUpdated += Test_PhysicsUpdated;
Console.Read();
}
private static void Test_PhysicsUpdated(object sender,PhysicsEventArgs e)
{
float AirTemp = e.Physics.airTemp;
Console.WriteLine(AirTemp);
}
}
}
然而,使用 tyrecontactnormal,我不知道如何获取这些数据。 在c#中intellisense给出如下描述:
float tyreContactNormal[4][3]
Vector for contact normal of each tyre[Front Left,Front Right,Rear Left,Rear Right][x,y,z]
我不知道“坐标”部分指的是什么,查找它最终会得到地理坐标,所以我希望有人能指出我正确的方向。
rgds
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)