Hello everyone,
this is the game for people who don’t already know it : youtube video
Am looking for theory about making an object move around another object and stay stick to it, adding codes to your answer will be very appreciate it (language doesn’t matter)
thank you
I reference the code from Mario Galaxy-like circular gravity?
var myGravity : Transform; var gravityVal : float = 9.8; function Update() { rigidbody.velocity += gravityVal * (myGravity.position - transform.position).normalized; var myY : float = transform.eulerAngles.y; transform.LookAt(transform.position + myGravity.position); transform.eulerAngles = Vector3(transform.eulerAngles.x + 90, myY, transform.eulerAngles.z); }
This should work with spheres and cubes just fine. I hope this helps.