From 3ed5257c222f34b591b744ef6418b5c1165be25f Mon Sep 17 00:00:00 2001 From: J08nY Date: Sat, 22 Apr 2017 16:58:23 +0200 Subject: Camera now rotates around worlds --- cube.tscn | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 cube.tscn (limited to 'cube.tscn') diff --git a/cube.tscn b/cube.tscn new file mode 100644 index 0000000..bfbb728 --- /dev/null +++ b/cube.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://mesh/cube.dae" type="PackedScene" id=1] +[ext_resource path="res://scripts/cube.gd" type="Script" id=2] + +[sub_resource type="ConvexPolygonShape" id=1] + +points = PoolVector3Array( 1, -1, -0.999512, 1, -1, 1, -1, -1, 0.999512, -0.999512, -1, -1, 1, 1, -0.999512, -0.999512, 1, -1, -1, 1, 0.999512, 0.999512, 1, 1, 1, -1, -0.999512, 1, 1, -0.999512, 0.999512, 1, 1, 1, -1, 1, 1, -1, 1, 0.999512, 1, 1, -1, 1, 0.999512, -1, -1, 0.999512, -1, -1, 0.999512, -1, 1, 0.999512, -0.999512, 1, -1, -0.999512, -1, -1, 1, 1, -0.999512, 1, -1, -0.999512, -0.999512, -1, -1, -0.999512, 1, -1 ) + +[node name="Scene Root" instance=ExtResource( 1 )] + +script = ExtResource( 2 ) + +[node name="Cube" parent="."] + +use_in_baked_light = false +material/0 = null + +[node name="StaticBody" type="StaticBody" parent="Cube"] + +input_ray_pickable = true +input_capture_on_drag = false +shape_count = 1 +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 ) +shapes/0/trigger = true +collision_layer = 1 +collision_mask = 1 +friction = 1.0 +bounce = 0.0 +constant_linear_velocity = Vector3( 0, 0, 0 ) +constant_angular_velocity = Vector3( 0, 0, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Cube/StaticBody"] + +shape = SubResource( 1 ) +trigger = true +_update_shape_index = 0 + +[connection signal="input_event" from="Cube/StaticBody" to="." method="_input_event"] + + -- cgit v1.2.3-70-g09d2