- Home /
Question by
GDKJustJonny · Apr 16, 2011 at 06:39 PM ·
mouseguncursoraim
2.5d game gun aim
Hi im trying to make a 2.5d game but i couldnt make my weapon point at cursor of mouse. I want to make somerthing like this
http://www.funny-games.biz/plazma-burst-2.html
Should this be done by raycast or its much more simple?
thnx 4 help!!!
Comment
Best Answer
Answer by GDKJustJonny · Apr 18, 2011 at 11:26 PM
I found solution by my self...
var speedRot = 1.0f;
function Update(){
transform.LookAt( speedRot*Vector3(Input.mousePosition.x-Screen.width/2, Input.mousePosition.y-Screen.height/2, 0) );}
Your answer
Follow this Question
Related Questions
Mouse Aim- Weapons 2 Answers
my gun wont follow my mouse 0 Answers
Problems with accurate third-person mouse aiming 0 Answers
Unity 3D Screen.lockCursor Problems 2 Answers
Alt+Tab pointer problem 0 Answers