Page 2 of 2

Re: [WIP] My FPS Game

Posted: Wed May 02, 2018 9:29 am
by Rainsen
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?

Re: [WIP] My FPS Game

Posted: Wed May 02, 2018 9:51 pm
by skr2000
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?
This was just hobby project but currently I'm planning to release.

Re: [WIP] My FPS Game

Posted: Wed May 09, 2018 1:14 am
by Oggy
Can you guide how to do lean peek?

Re: [WIP] My FPS Game

Posted: Wed May 09, 2018 5:07 am
by chrisb
Oggy wrote:Can you guide how to do lean peek?
Please please pretty please :)

Re: [WIP] My FPS Game

Posted: Wed May 09, 2018 8:35 pm
by ScoutMaster
Oggy wrote:Can you guide how to do lean peek?

I dont use mfps anymore but this should get u started with a lean peak..

note, make an empty object and place everything underneath it and add this script

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);
        }
let me know if u win into any issues:)