What I want to do is basically animate the weapon from the bottom and slide it up like he pulled it out of his sling or something. But I have never really done animation before. All I have is the actual weapon model and I attached it to the FPS player main camera. Can someone help guide me in the correct direction :] Please and thank you!
You could make the animation in your 3D program(Blender, Maya, etc…), and code it to Play the animations whenever… OR you could use a simple script in JS or C# using Vector3.MoveTowards like so. This is a simple C# EXAMPLE.
using UnityEngine;
using System.Collections;
public class EXAMPLE : MonoBehaviour
{
Vector3 showPos;
Vector3 hidePos;
bool hide = false;
void Start()
{
showPos = transform.position;
hidePos = showPos + Vector3.down;
}
void Update()
{
if(hide)
{
transform.position = Vector3.MoveTowards(transform.position, hidePos, 1.0f);
}
else if(!hide)
{
transform.position = Vector3.MoveTowards(transform.position, showPos, 1.0f);
}
}
}
This is just an example to get you pointed in the right direction.