What do you want to save?
Add Code snippet
New code examples
-
C# 2021-11-14 07:27:20
how to make a ball roll left and right in unity
void FixedUpdate () { //SPHERE MOVEMENT float hor = Input.GetAxis("Horizontal"); float ver = Input.GetAxis("Vertical"); &nb... Add solution -
C# 2021-11-10 08:54:15
interpolate rotation unity3d
//using the cross-product is quite effective //Note: This is quite usefull for rigidbodys... //but you can also use that for transform with some code adjustments Vector3 targetDir; Vector3 currentDir = transform.forward; //whatever your currentDir is /... Add solution -
Javascript 2021-11-09 08:37:14
check if word has accented or unaccented javascript
//Normalize diacritics characters from originalText var originalText = "éàçèñ" var result = originalText.normalize('NFD').replace(/[\u0300-\u036f]/g, "") console.log(result) Add solution -
Other 2021-11-04 04:27:07
how to move towards an object unity
/// <summary> /// Move 2D sprite towards target /// </summary> /// <param name="target"></param> /// <param name="movementSpeed"></param> private void Move(Vector3 target, float movementSpeed) { ... Add solution -
Other 2021-10-28 10:58:05
godot first person controller script
extends KinematicBody onready var camera = $Pivot/Camera var gravity = -30 var max_speed = 8 var mouse_sensitivity = 0.002 # radians/pixel var velocity = Vector3() func get_input(): var input_dir = Vector3() # desired move in camera direction... Add solution -
Other 2021-10-26 21:34:05
godot smooth movement
extends KinematicBody2D const SPEED = 100.0 func _physics_process(delta): var input = Vector2() input.x += float(Input.is_action_pressed('ui_right')) input.x -= float(Input.is_action_pressed('ui_left')) input.y -= float(Input.is_action_pr... Add solution