- Home /
This question was
closed Aug 17, 2013 at 07:24 AM by
Fattie for the following reason:
Duplicate Question
Question by
tone20 · Aug 16, 2013 at 06:43 PM ·
javascriptobjectstyle
Amnesia style
soo im interested how to make i can drag and fire object like in amnesia any ideas?
Comment
Answer by BuildIntoGames · Aug 16, 2013 at 06:50 PM
Learn some basic javascript or C.
Heres a basic javascript I created that makes an object follow your mouse.
var followingObject : GameObject;
function Update () {
var v3T = Vector3(Input.mousePosition.x, Input.mousePosition.y, 3);
v3T = Camera.main.ScreenToWorldPoint (v3T);
followingObject.transform.position = v3T;
}
As for the shooting, you could use a RayCast system. Look up some tutorials on google or YouTube for that.