I know that this may be a real noob question but I am more of a modeler and animator and this scripting is new to me so I just need a tip here utilizing a script I created an animation for my player object to move on a button press however how can I write the script so that it takes into account where the player is currently because when i created the animation I did so only translating one axis but it keeps moving the player back to the start point so how can I script so that a. it ignores the animations ideas on x and z coordinates or b. to calculate and keep the current axis wherever they may be and add them to the animation here is my current code
function update () {
if (Input.GetButtonDown(“Jump”)){
GetComponent(“Animation”);
animation.Play() ;
}
}
Thanks in advance for any help offered…I do like Unity
Art MMPLLC