Added better character auto stepping and component settings

This commit is contained in:
Antoine Pilote
2023-08-12 16:12:39 -04:00
parent 1d7f9e007f
commit 691f46e0d6
10 changed files with 236 additions and 70 deletions

View File

@@ -45,6 +45,7 @@ class Scene {
// Transform
foreign static GetScript_(e)
foreign static GetLocalTranslation_(e)
foreign static GetTranslation_(e)
foreign static SetTranslation_(e, x, y, z)
foreign static SetRotation_(e, x, y, z)
@@ -123,11 +124,17 @@ class TransformComponent {
_entityId = id
}
GetLocalTranslation() {
var result = Scene.GetLocalTranslation_(_entityId)
return Vector3.new(result[0], result[1], result[2])
}
GetTranslation() {
var result = Scene.GetTranslation_(_entityId)
return Vector3.new(result[0], result[1], result[2])
}
SetTranslation(t) {
Scene.SetTranslation_(_entityId, t.x, t.y, t.z)
}