Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink
Share
Go down
Member [Lv. 1]
Member [Lv. 1]
Posts : 2
Points : 948
Rep : 1
Join date : 2016-01-18
View user profile

[Help] With Door Script

on Mon Feb 01, 2016 1:54 pm
Message reputation : 100% (1 vote)
Hi sorry for the post but im new to all this and i cant figure out what is wrong with the script its an amnesia type script where u can drag the doors etc if someone could help me would be greatly appreciated

Right im getting this error in unity.......
ArgumentException: Input Button Grab is not setup.
To change the input settings use: Edit -> Project Settings -> Input
DragRigidbodyUse.FixedUpdate () (at Assets/Custom/Scripts/DragRigidbodyUse.cs:71)

The part of script that apparantly needs changing......
if(Input.GetButton(GrabButton)){
if(!isObjectHeld){
tryPickObject();
tryPickupObject = true;
} else {
holdObject();
}
}else if(isObjectHeld){
DropObject();
}

if(Input.GetButton(ThrowButton) && isObjectHeld){
isObjectHeld = false;
objectHeld.GetComponent<Rigidbody>().useGravity = true;
ThrowObject();
}

if(Input.GetButton(UseButton)){
isObjectHeld = false;
tryPickObject();
tryPickupObject = false;
Use();
}
}

Thanks in advance for help.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum