aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-12 14:54:23 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-12 14:54:23 +0100
commit72ba9f9dd9553c8bbca83f4f73a59d28d1f89273 (patch)
tree1676514edc2124ec4a83c277e20b226871850a10 /src/example
parentef0235137fc931c09e7f6493c7df46d09c47008d (diff)
added rotation for preview
Diffstat (limited to 'src/example')
-rw-r--r--src/example/game.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/example/game.cpp b/src/example/game.cpp
index 5c8d749..aab8d66 100644
--- a/src/example/game.cpp
+++ b/src/example/game.cpp
@@ -66,6 +66,11 @@ class MyScript1 : public Script {
//add collider switch
break;
}
+ case Keycode::Q: {
+ Rigidbody & rg = this->get_component<Rigidbody>();
+ rg.data.angular_velocity = 1;
+ break;
+ }
default:
break;
}