Re: [WIP] My FPS Game
Posted: Wed May 02, 2018 9:29 am
I'm really impressed by your project, skr2000. How long have you been working on this game so far? Are you planning to release it someday or this just a hobby project of yours?
Official forum site of LovattoStudio
https://www.lovattostudio.com/forum/
This was just hobby project but currently I'm planning to release.Rainsen wrote:I'm really impressed by your project, skr2000. How long have you been working on this game so far? Are you planning to release it someday or this just a hobby project of yours?
Please please pretty pleaseOggy wrote:Can you guide how to do lean peek?
Oggy wrote:Can you guide how to do lean peek?
Code: Select all
public bool canLean = true;
[Range(0, 100)]
public float leanAmount;
[Range(0, 100)]
public float smoothSpeed;
if (Input.GetKey(KeyCode.Q))
{
transform.localRotation = Quaternion.Lerp(transform.localRotation, Quaternion.Euler(new Vector3(0, 0, leanAmount)), Time.deltaTime * smoothSpeed);
}
else if(Input.GetKey(KeyCode.E))
{
transform.localRotation = Quaternion.Lerp(transform.localRotation, Quaternion.Euler(new Vector3(0, 0, -leanAmount)), Time.deltaTime * smoothSpeed);
}
else
{
transform.localRotation = Quaternion.Lerp(transform.localRotation, Quaternion.Euler(new Vector3(0, 0, 0)), Time.deltaTime * smoothSpeed);
}