Hallo,
weiß jemand hier, wie man die Funktion Entity.PhysicsFromMesh aufruft, ohne Gmod zu crashen? Ich habe versucht, den folgenden Table zu übergeben, denn auf der verlinkten Webseite steht:
"A mesh table stores the triangular faces of the model in tabular structure. Each triangle is a table with the three vector positions defined in clockwise order."
Code:
mesh = {
{
Vector(0, 0, 0),
Vector(50, 0, 50),
Vector(50, 0, 0)
}
}
Aufrufen tue ich die Funktion serverseitig für ein neu erstelltes Entity:
Code:
ent = ents.Create("prop_physics")
ent:SetPos(Entity(1):GetEyeTrace().HitPos)
ent:PhysicsFromMesh(mesh)
ent:Spawn()
Dies ist aber scheinbar eine dumme Idee, denn sobald ich den Code ausführe stürzt Gmod ab.