Search Unity

[RELEASED] Complete Physics Platformer Kit

Discussion in 'Assets and Asset Store' started by Greg-Sergeant, Oct 2, 2013.

  1. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Hello Lakris, in the README DOC, it says you need to make your own rig and anims if you want to use your own character.
     
  2. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    Hi Lakris, you need to build your animations in Blender as actions and Unity will read them. The arms animations are used in a separate layer of the animator, and they should only contain the arms bones.
     
  3. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    They don't need to contain just the arm bones. In the Import/Animations tab, you can use the Mask option to filter out whatever bones you don't want to animate. In the case of the grab/throw abilities and their animations, you would filter out the lower half of the model so the legs still animate while the arms follow the grab/throw/etc animations.
     
  4. Lakris

    Lakris

    Joined:
    Jan 10, 2014
    Posts:
    17
    Thank you, it helped me alot with animations in Blender and Masks for the arms in Unity

    Now i have a new problem with picking up, just like Kamen earlier in this thread:
    "Can't lift object here. If nothing is above the player, perhaps you need to add a layerMask parameter to line 136 of the code in this script,the CheckSphere function, in order to make sure it isn't detecting something above the players head that is invisible"

    But i dont understand the solution from Greg: "adjust the lift position to a place where nothing is intersecting"
    what is the lift position and where is that?

    Funny thing, in the demo scenes, pickup is not working in 2D game demo scene, only in 3D game demo scene.

    I am trying to create a 2D/2.5D game :-(

    Thx :)

    EDIT: Ok, thats really hard to figure out, when its called /named 3 different names, here,in Unity and in the Manual.
    In the players inspector under Throwing: Hold Offset, thats the Lift Position or The Gap or Position Offset
     
    Last edited: Feb 20, 2016
  5. Lakris

    Lakris

    Joined:
    Jan 10, 2014
    Posts:
    17
    Now i am trying to add Daniel SNDs scripts.
    My enemy shooter projectile will not harm my player? i have tried it with my own bullet from Blender and a sphere from Unity
    Not even if i do exactly like Daniel in the video tutorial(i used sphere not cylinder), the projectile just pushes my Player!?

    Any Ideas?

    Thx :)

    EDIT: Hahaha... its crazy how glitchy it is, now it works the way Daniel is doing it, still cant figure out my own projectile, it keeps on pushing and not hurting) :)
     
    Last edited: Feb 21, 2016
  6. Lakris

    Lakris

    Joined:
    Jan 10, 2014
    Posts:
    17
    Funny, it is like its the same problems i have now in Unity 5, like i did in Unity 4, when first started to use this kit.

    Ladder is still a problem, before i was only able to climb once, now i cant at all.

    Oneway platform is not working at all, i remember it was also a problem in Unity 4, even though it was made exactly like Daniels, but after a while i resolved it in Unity 4 somehow, by swithing layers or something?! :)

    DEIT: LOL! Ladder and Oneway platforms working whenever they want to.
    Sometimes both works and sometimes just one or none of them works :)
     
    Last edited: Feb 21, 2016
  7. dragonstar

    dragonstar

    Joined:
    Sep 27, 2010
    Posts:
    222
    i bought INCONTROL on the asset store
     
  8. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69

    Larkris, are you still having a problem hooking up the the PICK UP action? I had this problem, too. The solution is on tab 19 of this site. Look for Sean3DMonley, 2nd one down from the top. It will show you what I did to get the pick up box working.

    Sean
     
  9. Lakris

    Lakris

    Joined:
    Jan 10, 2014
    Posts:
    17
    Yes i solved it, it was the "gap/lift position/hold offset" i mentioned above :)
     
  10. baptistegr

    baptistegr

    Joined:
    Jul 1, 2015
    Posts:
    6
    I used this asset, it's really well made. Congrats!
     
  11. Kamen

    Kamen

    Joined:
    Jan 28, 2013
    Posts:
    15
    How may i go about turning this into multiplayer? is there another asset that i can combine with this to help cut down the work load?

    Thanks.
     
  12. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Has anyone been able to get the 3D game to work with 2 mobile virtual joysticks? Left stick to move, right stick for camera, and a jump button? I'm trying to hook up the physics platformer player to the "MobileSingleStickControl" for the left and right stick.
    The Standard assets MobileSingleStickControl and standard assets ThirdPersonController just work if you are set up to run on the Android build with an EventSystem. The physics platformer player and the MobileSingleStickControl do not work together right out of the box. I'm trying to use this video to get the virtual joysticks to work, but little luck.
     
  13. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Has anyone tried the
    Addons on the Physics Platformer Kit
    in Unity 5.3? Does it work? I saw this You Tube walk through.
     
    Helienio and DuncanIdaho like this.
  14. Kamen

    Kamen

    Joined:
    Jan 28, 2013
    Posts:
    15
    All of the addons seen in that video work in Unity 5.3, well for me they do atleast. Hope this helps :D
     
    DuncanIdaho likes this.
  15. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Cool thanks, Kamen. I'll have to get them, too.
     
  16. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Does anyone want to create mobile move and jump buttons?

    First, set up the scene for Android developement. File> Build Settings> select Android. Then, hit the Switch Platform button.

    Download the free controller: https://www.assetstore.unity3d.com/en/#!/content/15233
    I followed the simple instructions for the CN Controls: Created a canvas and dragged in the "Joystick" prefab and the "Button" prefab. Added the "using CnControls;" to the PlayerMove script.

    Then, I edited the "input" lines. Here is the PlayerMove script I edited. You can copy it if you have not edited your script. If you have edited your script, then look for the //SR comments to see the lines I changed.
    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using UnityEngine.UI;
    5. using UnityEngine.EventSystems;
    6. using CnControls; //SR
    7.  
    8. //handles player movement, utilising the CharacterMotor class
    9. [RequireComponent(typeof(CharacterMotor))]
    10. [RequireComponent(typeof(DealDamage))]
    11. [RequireComponent(typeof(AudioSource))]
    12. [RequireComponent(typeof(Rigidbody))]
    13. public class PlayerMove : MonoBehaviour
    14. {
    15.    //setup
    16.    public bool sidescroller;           //if true, won't apply vertical input
    17.    public Transform mainCam, floorChecks;     //main camera, and floorChecks object. FloorChecks are raycasted down from to check the player is grounded.
    18.    public Animator animator;           //object with animation controller on, which you want to animate
    19.    public AudioClip jumpSound;           //play when jumping
    20.    public AudioClip landSound;           //play when landing on ground
    21.  
    22.    //movement
    23.    public float accel = 70f;           //acceleration/deceleration in air or on the ground
    24.    public float airAccel = 18f;      
    25.    public float decel = 7.6f;
    26.    public float airDecel = 1.1f;
    27.    [Range(0f, 5f)]
    28.    public float rotateSpeed = 0.7f, airRotateSpeed = 0.4f;   //how fast to rotate on the ground, how fast to rotate in the air
    29.    public float maxSpeed = 9;                 //maximum speed of movement in X/Z axis
    30.    public float slopeLimit = 40, slideAmount = 35;       //maximum angle of slopes you can walk on, how fast to slide down slopes you can't
    31.    public float movingPlatformFriction = 7.7f;         //you'll need to tweak this to get the player to stay on moving platforms properly
    32.  
    33.    //jumping
    34.    public Vector3 jumpForce =  new Vector3(0, 13, 0);     //normal jump force
    35.    public Vector3 secondJumpForce = new Vector3(0, 13, 0); //the force of a 2nd consecutive jump
    36.    public Vector3 thirdJumpForce = new Vector3(0, 13, 0);   //the force of a 3rd consecutive jump
    37.    public float jumpDelay = 0.1f;               //how fast you need to jump after hitting the ground, to do the next type of jump
    38.    public float jumpLeniancy = 0.17f;             //how early before hitting the ground you can press jump, and still have it work
    39.    [HideInInspector]
    40.    public int onEnemyBounce;          
    41.  
    42.    private int onJump;
    43.    private bool grounded;
    44.    private Transform[] floorCheckers;
    45.    private Quaternion screenMovementSpace;
    46.    private float airPressTime, groundedCount, curAccel, curDecel, curRotateSpeed, slope;
    47.    private Vector3 direction, moveDirection, screenMovementForward, screenMovementRight, movingObjSpeed;
    48.  
    49.    private CharacterMotor characterMotor;
    50.    private EnemyAI enemyAI;
    51.    private DealDamage dealDamage;
    52.    private Rigidbody rigid;
    53.    private AudioSource aSource;
    54.  
    55.    //setup
    56.    void Awake()
    57.    {
    58.      //create single floorcheck in centre of object, if none are assigned
    59.      if(!floorChecks)
    60.      {
    61.        floorChecks = new GameObject().transform;
    62.        floorChecks.name = "FloorChecks";
    63.        floorChecks.parent = transform;
    64.        floorChecks.position = transform.position;
    65.        GameObject check = new GameObject();
    66.        check.name = "Check1";
    67.        check.transform.parent = floorChecks;
    68.        check.transform.position = transform.position;
    69.        Debug.LogWarning("No 'floorChecks' assigned to PlayerMove script, so a single floorcheck has been created", floorChecks);
    70.      }
    71.      //assign player tag if not already
    72.      if(tag != "Player")
    73.      {
    74.        tag = "Player";
    75.        Debug.LogWarning ("PlayerMove script assigned to object without the tag 'Player', tag has been assigned automatically", transform);
    76.      }
    77.      //usual setup
    78.      mainCam = GameObject.FindGameObjectWithTag("MainCamera").transform;
    79.      dealDamage = GetComponent<DealDamage>();
    80.      characterMotor = GetComponent<CharacterMotor>();
    81.      rigid = GetComponent<Rigidbody>();
    82.      aSource = GetComponent<AudioSource>();
    83.      //gets child objects of floorcheckers, and puts them in an array
    84.      //later these are used to raycast downward and see if we are on the ground
    85.      floorCheckers = new Transform[floorChecks.childCount];
    86.      for (int i=0; i < floorCheckers.Length; i++)
    87.        floorCheckers[i] = floorChecks.GetChild(i);
    88.    }
    89.  
    90.    //get state of player, values and input
    91.    void Update()
    92.    {  
    93.      //stops rigidbody "sleeping" if we don't move, which would stop collision detection
    94.      rigid.WakeUp();
    95.      //handle jumping
    96.      JumpCalculations ();
    97.      //adjust movement values if we're in the air or on the ground
    98.      curAccel = (grounded) ? accel : airAccel;
    99.      curDecel = (grounded) ? decel : airDecel;
    100.      curRotateSpeed = (grounded) ? rotateSpeed : airRotateSpeed;
    101.        
    102.      //get movement axis relative to camera
    103.      screenMovementSpace = Quaternion.Euler (0, mainCam.eulerAngles.y, 0);
    104.      screenMovementForward = screenMovementSpace * Vector3.forward;
    105.      screenMovementRight = screenMovementSpace * Vector3.right;
    106.    
    107.      Vector3 movement = new Vector3(CnInputManager.GetAxis ("Horizontal"), CnInputManager.GetAxis ("Vertical"), 0f);  //SR
    108.    
    109.      //get movement input, set direction to move in
    110.      //float h = Input.GetAxisRaw ("Horizontal");
    111.      //float v = Input.GetAxisRaw ("Vertical");
    112.    
    113.    
    114.      //Mobile Controls SR
    115.    
    116.      float h = CnInputManager.GetAxis ("Horizontal");  //SR
    117.      float v = CnInputManager.GetAxis ("Vertical");  //SR
    118.    
    119.      //only apply vertical input to movemement, if player is not sidescroller
    120.      if(!sidescroller)
    121.        direction = (screenMovementForward * v) + (screenMovementRight * h);
    122.      else
    123.        direction = Vector3.right * h;
    124.      moveDirection = transform.position + direction;
    125.    }
    126.  
    127.    //apply correct player movement (fixedUpdate for physics calculations)
    128.    void FixedUpdate()
    129.    {
    130.      //are we grounded
    131.      grounded = IsGrounded ();
    132.      //move, rotate, manage speed
    133.      characterMotor.MoveTo (moveDirection, curAccel, 0.7f, true);
    134.      if (rotateSpeed != 0 && direction.magnitude != 0)
    135.        characterMotor.RotateToDirection (moveDirection , curRotateSpeed * 5, true);
    136.      characterMotor.ManageSpeed (curDecel, maxSpeed + movingObjSpeed.magnitude, true);
    137.      //set animation values
    138.      if(animator)
    139.      {
    140.        animator.SetFloat("DistanceToTarget", characterMotor.DistanceToTarget);
    141.        animator.SetBool("Grounded", grounded);
    142.        animator.SetFloat("YVelocity", GetComponent<Rigidbody>().velocity.y);
    143.      }
    144.    }
    145.  
    146.    //prevents rigidbody from sliding down slight slopes (read notes in characterMotor class for more info on friction)
    147.    void OnCollisionStay(Collision other)
    148.    {
    149.      //only stop movement on slight slopes if we aren't being touched by anything else
    150.      if (other.collider.tag != "Untagged" || grounded == false)
    151.        return;
    152.      //if no movement should be happening, stop player moving in Z/X axis
    153.      if(direction.magnitude == 0 && slope < slopeLimit && rigid.velocity.magnitude < 2)
    154.      {
    155.        //it's usually not a good idea to alter a rigidbodies velocity every frame
    156.        //but this is the cleanest way i could think of, and we have a lot of checks beforehand, so it should be ok
    157.        rigid.velocity = Vector3.zero;
    158.      }
    159.    }
    160.  
    161.    //returns whether we are on the ground or not
    162.    //also: bouncing on enemies, keeping player on moving platforms and slope checking
    163.    private bool IsGrounded()
    164.    {
    165.      //get distance to ground, from centre of collider (where floorcheckers should be)
    166.      float dist = GetComponent<Collider>().bounds.extents.y;
    167.      //check whats at players feet, at each floorcheckers position
    168.      foreach (Transform check in floorCheckers)
    169.      {
    170.        RaycastHit hit;
    171.        if(Physics.Raycast(check.position, Vector3.down, out hit, dist + 0.05f))
    172.        {
    173.          if(!hit.transform.GetComponent<Collider>().isTrigger)
    174.          {
    175.            //slope control
    176.            slope = Vector3.Angle (hit.normal, Vector3.up);
    177.            //slide down slopes
    178.            if(slope > slopeLimit && hit.transform.tag != "Pushable")
    179.            {
    180.              Vector3 slide = new Vector3(0f, -slideAmount, 0f);
    181.              rigid.AddForce (slide, ForceMode.Force);
    182.            }
    183.            //enemy bouncing
    184.            if (hit.transform.tag == "Enemy" && rigid.velocity.y < 0)
    185.            {
    186.              enemyAI = hit.transform.GetComponent<EnemyAI>();
    187.              enemyAI.BouncedOn();
    188.              onEnemyBounce ++;
    189.              dealDamage.Attack(hit.transform.gameObject, 1, 0f, 0f);
    190.            }
    191.            else
    192.              onEnemyBounce = 0;
    193.            //moving platforms
    194.            if (hit.transform.tag == "MovingPlatform" || hit.transform.tag == "Pushable")
    195.            {
    196.              movingObjSpeed = hit.transform.GetComponent<Rigidbody>().velocity;
    197.              movingObjSpeed.y = 0f;
    198.              //9.5f is a magic number, if youre not moving properly on platforms, experiment with this number
    199.              rigid.AddForce(movingObjSpeed * movingPlatformFriction * Time.fixedDeltaTime, ForceMode.VelocityChange);
    200.            }
    201.            else
    202.            {
    203.              movingObjSpeed = Vector3.zero;
    204.            }
    205.            //yes our feet are on something
    206.            return true;
    207.          }
    208.        }
    209.      }
    210.      movingObjSpeed = Vector3.zero;
    211.      //no none of the floorchecks hit anything, we must be in the air (or water)
    212.      return false;
    213.    }
    214.  
    215.    //jumping
    216.    private void JumpCalculations()
    217.    {
    218.      //keep how long we have been on the ground
    219.      groundedCount = (grounded) ? groundedCount += Time.deltaTime : 0f;
    220.    
    221.      //play landing sound
    222.      if(groundedCount < 0.25 && groundedCount != 0 && !GetComponent<AudioSource>().isPlaying && landSound && GetComponent<Rigidbody>().velocity.y < 1)
    223.      {
    224.        aSource.volume = Mathf.Abs(GetComponent<Rigidbody>().velocity.y)/40;
    225.        aSource.clip = landSound;
    226.        aSource.Play ();
    227.      }
    228.      //if we press jump in the air, save the time
    229.      //if (Input.GetButtonDown ("Jump") && !grounded)
    230.        //airPressTime = Time.time;
    231.      
    232.      if (CnInputManager.GetButtonDown ("Jump") && !grounded)  //SR
    233.        airPressTime = Time.time;
    234.    
    235.      //if were on ground within slope limit
    236.      if (grounded && slope < slopeLimit)
    237.      {
    238.        //and we press jump, or we pressed jump justt before hitting the ground
    239.        if (CnInputManager.GetButtonDown ("Jump") || airPressTime + jumpLeniancy > Time.time) //SR
    240.        {  
    241.          //increment our jump type if we haven't been on the ground for long
    242.          onJump = (groundedCount < jumpDelay) ? Mathf.Min(2, onJump + 1) : 0;
    243.          //execute the correct jump (like in mario64, jumping 3 times quickly will do higher jumps)
    244.          if (onJump == 0)
    245.              Jump (jumpForce);
    246.          else if (onJump == 1)
    247.              Jump (secondJumpForce);
    248.          else if (onJump == 2){
    249.              Jump (thirdJumpForce);
    250.              onJump --;
    251.          }
    252.        }
    253.      }
    254.    }
    255.  
    256.    //push player at jump force
    257.    public void Jump(Vector3 jumpVelocity)
    258.    {
    259.      if(jumpSound)
    260.      {
    261.        aSource.volume = 1;
    262.        aSource.clip = jumpSound;
    263.        aSource.Play ();
    264.      }
    265.      rigid.velocity = new Vector3(rigid.velocity.x, 0f, rigid.velocity.z);
    266.      rigid.AddRelativeForce (jumpVelocity, ForceMode.Impulse);
    267.      airPressTime = 0f;
    268.    }
    269. }
    270.  
    271.  
     
    Last edited: Mar 4, 2016
    ksalmon1 likes this.
  17. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    hello,

    woot nice !!!

    could you update topic with code mark ?


    thank you.
     
  18. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Sure thing, how do I do Update the topic with code mark?
     
  19. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    I made a simple jet pack script if anyone would like it. You can set the time length of the flight and the Get Key.

    Code (csharp):
    1.  
    2. public float JetPackForce;
    3.   public float startTime = 3.5f;
    4.   public GameObject player;
    5.   void Start()
    6.   {
    7.   }
    8.   void FixedUpdate()
    9.   {
    10.   if (Input.GetKey(KeyCode.G))
    11.   {
    12.   startTime -= Time.deltaTime;
    13.   player.GetComponent<Rigidbody>().AddForce(new Vector3(0.0f, 1.0f, 0.0f) * JetPackForce);
    14.   }
    15.   if (startTime <= 0.0f)
    16.   {
    17.   player.GetComponent<Rigidbody>().velocity = Vector3.down * Time.smoothDeltaTime;
    18.   startTime = 3.5f;
    19.   }
    20.  
    Sean
     
    tequyla likes this.
  20. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Does anyone know where the code is that tells the enemy to be destroyed? I want to spawn a new enemy when one dies.

    Sean
     
  21. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    In the Health script, there's an option for Respawn (but it happens instantly upon death). If you wanted to spawn something else entirely (like another enemy), you could just add that enemies prefab to the Spawn on Death field in the Health script.
     
  22. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Cool, is there a way to tweek the code so when 1 enemy dies, 2 new enemies will spawn? They don't have to spawn at the same time, but one after the other.

    Sean
     
  23. internethip

    internethip

    Joined:
    Oct 21, 2013
    Posts:
    20
    When you use the free mouse look feature.
    If you move the camera completely below or above the target. The camera begins to spin around the the absolute point below(or above) the target. This is obviously an unwanted behavior and in my opinion is considered a bug.

    Has anyone developed a solution to this issue?

    I have reached out to the developer of this product as well and will report back what the verdict is from their side.
     
  24. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Hello, plindgren, have you tried the free cameras that come with Unity? There is a Free Look camera. You would need to import the camera standard assets.

    Sean
     
  25. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi I recently bought your asset! Looking good.

    Is it possible to have a platform that you can jump through upwards but land on the platform. If I place platform above the player the player hits the collider and can't get above it.

    Like in New Super Mario Bros. for example:

    Video 8m42s


    Mario can jump above these blue dotted platforms.

    Edit. I found solution: http://answers.unity3d.com/questions/362021/eficient-one-way-collider.html
     
    Last edited: Apr 7, 2016
  26. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Hey there Nadan, On page 7 of this forum, you will find a bunch of useful scripts. What you are looking for is the "One way Platforms." They were written by a really cool artist/programmer, DanielSnd.
     
  27. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Does anyone know how to make a rope that the player can swing, climb and jump off of?
     
  28. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    I almost have a rope working out, does anyone know how to create a sticky physics material that will work with the player? My physics material does not seem to do anything.
     
  29. nicolasbulchak

    nicolasbulchak

    Joined:
    Aug 9, 2013
    Posts:
    37
    Ok so its been a while since I've responded to this but I am back to trying to control my camera with my joystick.
    Using what you've provided I now have a the camera slowly floating up and the joystick pulls it down.
    I'm not sure what I'm doing wrong here.
    Would it be possible for me to check out your camera follow script to see what I'm doing wrong?
     
  30. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Do you have mouse movement interfering anywhere? To rule out something simple, check to make sure that nothing else can control the axis "CameraY" and could be pushing it upwards and fighting with another input.
     
  31. ranosfera

    ranosfera

    Joined:
    May 3, 2016
    Posts:
    2
    in the melee atack script, how can make my sword actually makes damage to the objects?
     
  32. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Hey ranosfera, if the sword is being held by the punch hand, the hand will do damage and it will look like the sword is dealing damage. Just a thought.
     
  33. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Is anyone using the 2D camera? When I collide with certain objects, the camera pushes in.
    How do I turn off the push in of the 2D camera when the player collides with objects?
     
  34. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Just remove every tag from the Avoid Clipping Tags variable on the CameraFollow inspector.
     
  35. Mike_011972

    Mike_011972

    Joined:
    Jun 8, 2009
    Posts:
    97
    I gave up using it as I couldn't the full control I wanted from it and started to use ProCamera2d. It allows for a lot more control over the camera, depending on what you game needs. I need to be able to zoom out for example when running fast (so I can see ahead).
    It's another cost, but it's really simple to use and it's something that you can reuse in other projects and it makes a huge difference to your game having a nice smooth camera.
     
  36. rjdfhorn2006

    rjdfhorn2006

    Joined:
    Jun 14, 2010
    Posts:
    141
    Can anyone help/describe how one would go about making the character rotate while moving? I have a character in midair with gravity off so they just float there. The character moves around as if it's a standard 3d platformer - it rotates to face the movement direction and everything. Here's what I want to do: while the character is moving around, I want to be able to make the character spin around it's x-axis when the player touches a specific button. Basically, imagine the character in this kit moving around but with the added capability to spin around it's x-axis. I'm ultimately trying to implement some swimming controls similar to Super Mario 64. Any help is appreciated.

    I should mention that I'm using the CharacterMotor script's RotateToDirection to face the direction of desired swim movement relative to the screen (left, right, forward, backward) - not to spin.
     
    Last edited: May 7, 2016
  37. Tiveran

    Tiveran

    Joined:
    Feb 17, 2016
    Posts:
    5
    Hey,

    I've just started playing around with the kit (it's great btw!) and was wondering how I could stop the player sliding on moving platforms when they start their move to points?

    Even using the moving platforms in the demo scene the player slides for a brief moment when the platform starts up and it can be easy to fall off if the player is on the edge of the platform. Any ideas?

    Thanks!
     
  38. THEAK472009

    THEAK472009

    Joined:
    Jan 24, 2013
    Posts:
    21
    Hello!
    I have the same question as Tiveran
     
  39. Tiveran

    Tiveran

    Joined:
    Feb 17, 2016
    Posts:
    5
    On top of the player sliding on moving platforms I've noticed another couple of issues.

    - Slope limit seems to still slide the player on slopes lower than amount the specified angle.
    - Similarly, the player can still move up slopes higher than the specified angle.
    - Acceleration does not increase until it hits max speed, the player will always move at acceleration speed.
    - Max speed is not used to cap the players speed, it does seem to effect movement speed, but perhaps adds to the acceleration?

    Would be awesome if you guys could offer some insights to fix these!

    Thanks again.
     
  40. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    the webpage for the webplayer dont load, can you correct it please
     
  41. nicolasbulchak

    nicolasbulchak

    Joined:
    Aug 9, 2013
    Posts:
    37
    I've started fresh. whole new scene with the bare bones of the Platformer Kit.
    I made the adjustments to the script and found that sensitivtyY is never declared anywhere.
    Am I missing part that defines what sensitivityY should be

    float angle2 = (Input.GetAxis("CameraY") * sensitivityY * 20f) * Time.deltaTime;
    followTarget.RotateAround(target.position, transform.right, -angle2);
     
  42. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    No, you need to declare it. It's just a float to control how fast it moves (when moved).
     
  43. nicolasbulchak

    nicolasbulchak

    Joined:
    Aug 9, 2013
    Posts:
    37
    ok so when I declare it as a float. at 0 it doesn't do anything. but as soon as I increase the sensitivityY float, it begins to slowly rotate vertically around my character automatically. What are your input settings setup like? Maybe I have that wrong
     
  44. nicolasbulchak

    nicolasbulchak

    Joined:
    Aug 9, 2013
    Posts:
    37
    ok I think I have it figured out. I think the extra motion was coming from the Input settings of Dead and Sensitivity. Changing these to much lower values stopped the drifting and now using higher values in the script I can move the camera at a normal rate. Thanks so much for all the help
     
  45. ChainsawFilms

    ChainsawFilms

    Joined:
    May 28, 2016
    Posts:
    18
    I have been playing around with the kit the last few days, learning Unity as I go. The additions available via this forum have been very nice, thank you to everyone :)

    Unless I'm missing something, I am unable to get jumping to be momentum based. As soon as you jump, you are no longer grounded so your air speed is defined (air speed and acceleration). I want my character to leap forward, not just up in the Y axis.

    Any advice would be appreciated, thank you.
     
  46. dragonstar

    dragonstar

    Joined:
    Sep 27, 2010
    Posts:
    222
    question someone knows how to add health recover like the little hearts in MARIO and how to add weapons
     
  47. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Just wrapped-up my 3d platforming title based on this kit! Between this kit and ProBuilder, that really provided the bulk of what I needed to complete this game! Download information can be found in the video description. :)

     
  48. joaobaltieri

    joaobaltieri

    Joined:
    Nov 8, 2015
    Posts:
    4
    Very very nice work Besus!
     
    Besus likes this.
  49. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Hello ChainsawFilms, I have been trying to add some forward force to the jump myself. I'm trying out addForce. If I get it to work, I'll post the solution. If you get it to work, please post your solution.
     
  50. sean3Dmonkey

    sean3Dmonkey

    Joined:
    Oct 21, 2014
    Posts:
    69
    Great work, Besus. That is a cute Dragon.