Hi,
Im working on a FPS at the moment (based on the tutorial) and got a problem with animations.
It should work this way:
If you look at an crank and press “e” in front of it an animation should start.
I created the object and the animations in C4D.
Imported them to Unity, import-options for the animations as follows:
Generation: Store in Root
Anim. Compression: keyframe Reduction
Anim. Wrap method: default
Split Anim: yes
Animations:
idle 0 0 default
down 0 10 default
After that i placed the objects in my game and added a Tag named “Konsole”.
Then i created a javascript file, added this to the object aswell.
function Update () {
if(Input.GetKeyDown("E")){
var object = gameObject.FindWithTag("Konsole");
object.animation.Play("down");
}
}
If I start the game and try to activate the object nothing happens.
Allready tried to switch “e” for a right-Mouseclick, but couldn’t find the correct name for that.
Would be great if someone could help me.