mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Fixed triggers mesh collision to account for all faces
This commit is contained in:
@@ -76,5 +76,9 @@ class CamScript is ScriptableEntity {
|
||||
cam.SetDirection(newDir)
|
||||
}
|
||||
|
||||
fixedUpdate(ts) {
|
||||
|
||||
}
|
||||
|
||||
exit() {}
|
||||
}
|
||||
@@ -204,6 +204,7 @@ class Brush {
|
||||
|
||||
var entities = []
|
||||
var targets = Scene.BrushGetTargets_(_entityId)
|
||||
|
||||
for(t in targets) {
|
||||
entities.add(Entity.new(t))
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class TriggerScript is ScriptableEntity {
|
||||
|
||||
fixedUpdate(ts) {
|
||||
var trigger = this.GetComponent("Trigger")
|
||||
Engine.Log("Hello")
|
||||
|
||||
if(trigger.GetOverlappingBodyCount() > 0) {
|
||||
var bodies = trigger.GetOverlappingBodies()
|
||||
var brush = this.GetComponent("Brush")
|
||||
@@ -32,7 +32,7 @@ class TriggerScript is ScriptableEntity {
|
||||
for(t in brush.GetTargets()) {
|
||||
var transform = t.GetComponent("Transform")
|
||||
var pos = transform.GetTranslation()
|
||||
Engine.Log("Hello")
|
||||
|
||||
pos.x = pos.x + 1.0 * ts
|
||||
|
||||
transform.SetTranslation(pos)
|
||||
|
||||
@@ -15,6 +15,10 @@ class TestScript is ScriptableEntity {
|
||||
_deltaTime = _deltaTime + ts
|
||||
|
||||
|
||||
}
|
||||
|
||||
fixedUpdate(ts) {
|
||||
|
||||
}
|
||||
|
||||
exit() {
|
||||
|
||||
Reference in New Issue
Block a user