socialg.it will shutdown on the 8th of February 2021 in favour of a new Git hosting system (Gitea) at git.socialnerds.org. Read the blog post.

Commit 5b907323 authored by Otto Naderer's avatar Otto Naderer

gun elev thingy working

- first firing wip'ey
parent 9695d1d5
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
# Blender v2.78 (sub 0) OBJ File: ''
# www.blender.org
mtllib tround.mtl
o Cylinder
v 0.052500 0.000000 -0.075000
v 0.052500 0.000000 0.075000
v 0.051491 -0.010242 -0.075000
v 0.051491 -0.010242 0.075000
v 0.048504 -0.020091 -0.075000
v 0.048504 -0.020091 0.075000
v 0.043652 -0.029167 -0.075000
v 0.043652 -0.029167 0.075000
v 0.037123 -0.037123 -0.075000
v 0.037123 -0.037123 0.075000
v 0.029167 -0.043652 -0.075000
v 0.029167 -0.043652 0.075000
v 0.020091 -0.048504 -0.075000
v 0.020091 -0.048504 0.075000
v 0.010242 -0.051491 -0.075000
v 0.010242 -0.051491 0.075000
v 0.000000 -0.052500 -0.075000
v 0.000000 -0.052500 0.075000
v -0.010242 -0.051491 -0.075000
v -0.010242 -0.051491 0.075000
v -0.020091 -0.048504 -0.075000
v -0.020091 -0.048504 0.075000
v -0.029167 -0.043652 -0.075000
v -0.029167 -0.043652 0.075000
v -0.037123 -0.037123 -0.075000
v -0.037123 -0.037123 0.075000
v -0.043652 -0.029167 -0.075000
v -0.043652 -0.029167 0.075000
v -0.048504 -0.020091 -0.075000
v -0.048504 -0.020091 0.075000
v -0.051491 -0.010242 -0.075000
v -0.051491 -0.010242 0.075000
v -0.052500 0.000000 -0.075000
v -0.052500 0.000000 0.075000
v -0.051491 0.010242 -0.075000
v -0.051491 0.010242 0.075000
v -0.048504 0.020091 -0.075000
v -0.048504 0.020091 0.075000
v -0.043652 0.029167 -0.075000
v -0.043652 0.029167 0.075000
v -0.037123 0.037123 -0.075000
v -0.037123 0.037123 0.075000
v -0.029167 0.043652 -0.075000
v -0.029167 0.043652 0.075000
v -0.020091 0.048504 -0.075000
v -0.020091 0.048504 0.075000
v -0.010242 0.051491 -0.075000
v -0.010242 0.051491 0.075000
v 0.000000 0.052500 -0.075000
v 0.000000 0.052500 0.075000
v 0.010242 0.051491 -0.075000
v 0.010242 0.051491 0.075000
v 0.020091 0.048504 -0.075000
v 0.020091 0.048504 0.075000
v 0.029167 0.043652 -0.075000
v 0.029167 0.043652 0.075000
v 0.037123 0.037123 -0.075000
v 0.037123 0.037123 0.075000
v 0.043652 0.029167 -0.075000
v 0.043652 0.029167 0.075000
v 0.048504 0.020091 -0.075000
v 0.048504 0.020091 0.075000
v 0.051491 0.010242 -0.075000
v 0.051491 0.010242 0.075000
v 0.010823 -0.002153 0.142579
v 0.011035 0.000000 0.142579
v 0.010195 -0.004223 0.142579
v 0.009175 -0.006131 0.142579
v 0.007803 -0.007803 0.142579
v 0.006131 -0.009175 0.142579
v 0.004223 -0.010195 0.142579
v 0.002153 -0.010823 0.142579
v 0.000000 -0.011035 0.142579
v -0.002153 -0.010823 0.142579
v -0.004223 -0.010195 0.142579
v -0.006131 -0.009175 0.142579
v -0.007803 -0.007803 0.142579
v -0.009175 -0.006131 0.142579
v -0.010195 -0.004223 0.142579
v -0.010823 -0.002153 0.142579
v -0.011035 0.000000 0.142579
v -0.010823 0.002153 0.142579
v -0.010195 0.004223 0.142579
v -0.009175 0.006131 0.142579
v -0.007803 0.007803 0.142579
v -0.006130 0.009175 0.142579
v -0.004223 0.010195 0.142579
v -0.002153 0.010823 0.142579
v 0.000000 0.011035 0.142579
v 0.002153 0.010823 0.142579
v 0.004223 0.010195 0.142579
v 0.006131 0.009175 0.142579
v 0.007803 0.007803 0.142579
v 0.009175 0.006131 0.142579
v 0.010195 0.004223 0.142579
v 0.010823 0.002153 0.142579
vn 0.9952 -0.0980 0.0000
vn 0.9569 -0.2903 0.0000
vn 0.8819 -0.4714 0.0000
vn 0.7730 -0.6344 0.0000
vn 0.6344 -0.7730 0.0000
vn 0.4714 -0.8819 0.0000
vn 0.2903 -0.9569 0.0000
vn 0.0980 -0.9952 0.0000
vn -0.0980 -0.9952 0.0000
vn -0.2903 -0.9569 0.0000
vn -0.4714 -0.8819 0.0000
vn -0.6344 -0.7730 0.0000
vn -0.7730 -0.6344 0.0000
vn -0.8819 -0.4714 0.0000
vn -0.9569 -0.2903 0.0000
vn -0.9952 -0.0980 0.0000
vn -0.9952 0.0980 0.0000
vn -0.9569 0.2903 0.0000
vn -0.8819 0.4714 0.0000
vn -0.7730 0.6344 0.0000
vn -0.6344 0.7730 0.0000
vn -0.4714 0.8819 0.0000
vn -0.2903 0.9569 0.0000
vn -0.0980 0.9952 0.0000
vn 0.0980 0.9952 0.0000
vn 0.2903 0.9569 0.0000
vn 0.4714 0.8819 0.0000
vn 0.6344 0.7730 0.0000
vn 0.7730 0.6344 0.0000
vn 0.8819 0.4714 0.0000
vn -0.5414 -0.6597 0.5212
vn 0.9569 0.2903 0.0000
vn 0.9952 0.0980 0.0000
vn -0.0000 0.0000 -1.0000
vn 0.0000 0.0000 1.0000
vn -0.5414 0.6597 0.5212
vn 0.7527 0.4023 0.5212
vn 0.0837 -0.8494 0.5212
vn -0.8494 0.0837 0.5212
vn 0.2477 0.8167 0.5212
vn 0.6597 -0.5414 0.5212
vn -0.6597 -0.5414 0.5212
vn -0.4023 0.7527 0.5212
vn 0.8167 0.2477 0.5212
vn -0.0837 -0.8494 0.5212
vn -0.8167 0.2477 0.5212
vn 0.4023 0.7527 0.5212
vn 0.5414 -0.6597 0.5212
vn -0.7527 -0.4023 0.5212
vn -0.2477 0.8167 0.5212
vn 0.8494 -0.0837 0.5212
vn 0.8494 0.0837 0.5212
vn -0.2477 -0.8167 0.5212
vn -0.7527 0.4023 0.5212
vn 0.5414 0.6597 0.5212
vn 0.4023 -0.7527 0.5212
vn -0.8167 -0.2477 0.5212
vn -0.0837 0.8494 0.5212
vn 0.8167 -0.2477 0.5212
vn -0.4023 -0.7527 0.5212
vn -0.6597 0.5414 0.5212
vn 0.6597 0.5414 0.5212
vn 0.2477 -0.8167 0.5212
vn -0.8494 -0.0837 0.5212
vn 0.0837 0.8494 0.5212
vn 0.7527 -0.4023 0.5212
usemtl None
s off
f 1//1 2//1 4//1 3//1
f 3//2 4//2 6//2 5//2
f 5//3 6//3 8//3 7//3
f 7//4 8//4 10//4 9//4
f 9//5 10//5 12//5 11//5
f 11//6 12//6 14//6 13//6
f 13//7 14//7 16//7 15//7
f 15//8 16//8 18//8 17//8
f 17//9 18//9 20//9 19//9
f 19//10 20//10 22//10 21//10
f 21//11 22//11 24//11 23//11
f 23//12 24//12 26//12 25//12
f 25//13 26//13 28//13 27//13
f 27//14 28//14 30//14 29//14
f 29//15 30//15 32//15 31//15
f 31//16 32//16 34//16 33//16
f 33//17 34//17 36//17 35//17
f 35//18 36//18 38//18 37//18
f 37//19 38//19 40//19 39//19
f 39//20 40//20 42//20 41//20
f 41//21 42//21 44//21 43//21
f 43//22 44//22 46//22 45//22
f 45//23 46//23 48//23 47//23
f 47//24 48//24 50//24 49//24
f 49//25 50//25 52//25 51//25
f 51//26 52//26 54//26 53//26
f 53//27 54//27 56//27 55//27
f 55//28 56//28 58//28 57//28
f 57//29 58//29 60//29 59//29
f 59//30 60//30 62//30 61//30
f 26//31 24//31 76//31 77//31
f 61//32 62//32 64//32 63//32
f 63//33 64//33 2//33 1//33
f 1//34 3//34 5//34 7//34 9//34 11//34 13//34 15//34 17//34 19//34 21//34 23//34 25//34 27//34 29//34 31//34 33//34 35//34 37//34 39//34 41//34 43//34 45//34 47//34 49//34 51//34 53//34 55//34 57//34 59//34 61//34 63//34
f 65//35 66//35 96//35 95//35 94//35 93//35 92//35 91//35 90//35 89//35 88//35 87//35 86//35 85//35 84//35 83//35 82//35 81//35 80//35 79//35 78//35 77//35 76//35 75//35 74//35 73//35 72//35 71//35 70//35 69//35 68//35 67//35
f 44//36 42//36 85//36 86//36
f 62//37 60//37 94//37 95//37
f 18//38 16//38 72//38 73//38
f 36//39 34//39 81//39 82//39
f 54//40 52//40 90//40 91//40
f 10//41 8//41 68//41 69//41
f 28//42 26//42 77//42 78//42
f 46//43 44//43 86//43 87//43
f 64//44 62//44 95//44 96//44
f 20//45 18//45 73//45 74//45
f 38//46 36//46 82//46 83//46
f 56//47 54//47 91//47 92//47
f 12//48 10//48 69//48 70//48
f 30//49 28//49 78//49 79//49
f 48//50 46//50 87//50 88//50
f 4//51 2//51 66//51 65//51
f 2//52 64//52 96//52 66//52
f 22//53 20//53 74//53 75//53
f 40//54 38//54 83//54 84//54
f 58//55 56//55 92//55 93//55
f 14//56 12//56 70//56 71//56
f 32//57 30//57 79//57 80//57
f 50//58 48//58 88//58 89//58
f 6//59 4//59 65//59 67//59
f 24//60 22//60 75//60 76//60
f 42//61 40//61 84//61 85//61
f 60//62 58//62 93//62 94//62
f 16//63 14//63 71//63 72//63
f 34//64 32//64 80//64 81//64
f 52//65 50//65 89//65 90//65
f 8//66 6//66 67//66 68//66
......@@ -8,14 +8,13 @@ extents = Vector3( 1, 1, 1 )
[node name="Spatial" type="Spatial"]
editor/display_folded = true
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.14667, 0 )
[node name="TestCube" type="TestCube" parent="."]
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
transform/local = Transform( 100, 0, 0, 0, 0.1, 0, 0, 0, 100, -0.0118325, -2.53486, 0.00344372 )
transform/local = Transform( 100, 0, 0, 0, 0.1, 0, 0, 0, 100, 0.205964, -2.65457, 0.0438108 )
layers = 1
geometry/visible = true
geometry/material_override = null
......@@ -56,12 +55,12 @@ _update_shape_index = 0
[node name="Spatial" parent="." instance=ExtResource( 1 )]
transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.575415, 0 )
transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.758261, 0 )
[node name="OmniLight" type="OmniLight" parent="."]
[node name="DirectionalLight" type="DirectionalLight" parent="."]
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
transform/local = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 35.4294, 0 )
transform/local = Transform( 0.652077, 0.610151, -0.450013, 0, 0.593565, 0.804786, 0.758153, -0.524783, 0.38705, 0, 35.4294, 55.5707 )
layers = 1
params/enabled = true
params/editor_only = false
......@@ -71,13 +70,15 @@ colors/diffuse = Color( 1, 1, 1, 1 )
colors/specular = Color( 1, 1, 1, 1 )
shadow/shadow = true
shadow/darkening = 0.0
shadow/z_offset = 0.001
shadow/z_offset = 0.05
shadow/z_slope_scale = 0.0
shadow/esm_multiplier = 60.0
shadow/blur_passes = 1.0
projector = null
operator = 0
params/radius = 155.782
params/attenuation = 1.0
shadow/mode = 0
shadow/max_distance = 0.0
shadow/split_weight = 0.5
shadow/zoffset_scale = 2.0
......@@ -2,6 +2,7 @@
extends VehicleBody
# Member variables
var shotscene = preload("res://tank-round.tscn")
const STEER_SPEED = .25
const STEER_LIMIT = .3
......@@ -57,7 +58,24 @@ func _input(ie):
var turret = get_node("Turret")
var cannon = get_node("Turret/Cannon")
#var pitch = rad2deg(camera.get_rotation().x)
#print(cannon.get_rotation())
var plus_pitch = view_sensitivity * -ie.relative_y
var plus_yaw = fmod(view_sensitivity * ie.relative_x,360)
var can_rot = cannon.get_rotation()
can_rot.z -= deg2rad(plus_pitch)
var can_elev = rad2deg(can_rot.z)
if can_elev < 7 and can_elev > -30:
cannon.set_rotation(can_rot)
turret.rotate(Vector3(0,1,0), deg2rad(plus_yaw))
cannon.rotate(Vector3(0,0,1), deg2rad(plus_pitch))
#cannon.rotate(Vector3(0,0,1), deg2rad(plus_pitch))
#print(deg2rad(plus_pitch))
#print(rad2deg(cannon.get_rotation().z))
#print(turret.get_rotation())
elif ie.type == InputEvent.MOUSE_BUTTON:
if ie.button_index == BUTTON_LEFT and ie.is_pressed():
print("LEFT CLICK")
var shot = shotscene.instance()
get_parent().add_child(shot)
#shot.set_pos(Vector3(0,0,0))
shot.set_linear_velocity(Vector3(0,0,100))
\ No newline at end of file
extends RigidBody
var life_span = 0
func _fixed_process(delta):
life_span += delta
print(life_span)
\ No newline at end of file
[gd_scene load_steps=3 format=1]
[ext_resource path="res://tround.msh" type="Mesh" id=1]
[sub_resource type="CapsuleShape" id=1]
radius = 0.0883809
height = 0.213535
[node name="RigidBody" type="RigidBody"]
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
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 = false
collision/layers = 1
collision/mask = 1
mode = 0
mass = 1.0
friction = 1.0
bounce = 0.0
gravity_scale = 1.0
custom_integrator = false
continuous_cd = false
contacts_reported = 0
contact_monitor = false
sleeping = false
can_sleep = true
axis_lock = 0
velocity/linear = Vector3( 0, 0, 0 )
velocity/angular = Vector3( 0, 0, 0 )
damp_override/linear = -1.0
damp_override/angular = -1.0
[node name="MeshInstance" type="MeshInstance" parent="."]
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
layers = 1
geometry/visible = true
geometry/material_override = null
geometry/cast_shadow = 1
geometry/receive_shadows = true
geometry/range_begin = 0.0
geometry/range_end = 0.0
geometry/extra_cull_margin = 0.0
geometry/billboard = false
geometry/billboard_y = false
geometry/depth_scale = false
geometry/visible_in_all_rooms = false
geometry/use_baked_light = false
geometry/baked_light_tex_id = 0
mesh/mesh = ExtResource( 1 )
mesh/skeleton = NodePath("..")
material/0 = null
[node name="CollisionShape" type="CollisionShape" parent="."]
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
shape = SubResource( 1 )
trigger = false
_update_shape_index = 0
File added
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment