blob: e450780c6db0a6f4ea87e8b226a42704c0bc3741 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
extends Spatial
var target_basis : Basis
func _ready():
target_basis = transform.basis
func _process(delta):
transform.basis = transform.basis.slerp(target_basis, delta*8)
func roll(dir : Vector2):
target_basis = target_basis.rotated(Vector3(dir.y,0,-dir.x), deg2rad(90))
|