Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

CakeMonsTv

Member
  • Content count

    39
  • Joined

  • Last visited

Community Reputation

4 Neutral

About CakeMonsTv

  • Rank
    Member

Contact Methods

Profile Information

  • Gender
    Male
  • Location:
    England
  • Interests
    game developer

Recent Profile Visitors

423 profile views
  1. Enabling/disabling scripts on collision

    Thanks, I had to pu else if statement like you said and rename void update to sail and then call it in the first if statement.
  2. Enabling/disabling scripts on collision

    Hello. This script should disable RigidbodyFirstPersonController and enable BoatController scripts when object with tag "player" enters the collider and presses "E". When "E" is pressed once more, it should enable RigidbodyFirstPersonController and disable boatcontroller. The problem is that it executes all at the same time, disables RigidBodyFirstPersonController and doesn't enable BoatController and when i click "E" again it doesn't enable RigidBodyFirstPersonController back. (image 2) Images: https://gyazo.com/b3740c0ecd4bb5da4b7400f7afe784f4 https://gyazo.com/08e1efbc2ac9325c9828770b21a31638 Script: using UnityEngine; using UnityStandardAssets.Characters.FirstPerson; public class SailZone : MonoBehaviour { public GameObject Schooner; public GameObject Pirate; public KeyCode sailKey; public bool sailState = false; void OnTriggerStay(Collider target) { if(target.tag == "Player") { if (Input.GetKeyDown(sailKey) && sailState == false) { sailState = true; Debug.Log ("Entered the zone"); } if (Input.GetKeyDown(sailKey) && sailState == true) { sailState = false; Pirate = GameObject.FindWithTag ("Player"); Schooner.GetComponent<BoatController>().enabled = false; Pirate.GetComponent<RigidbodyFirstPersonController>().enabled = true; Debug.Log ("Leave"); } } } void Update(){ if (sailState = true && Schooner.GetComponent<BoatController> ().enabled == false) { Schooner.GetComponent<BoatController> ().enabled = true; Pirate = GameObject.FindWithTag ("Player"); Pirate.GetComponent<RigidbodyFirstPersonController>().enabled = false; Debug.Log ("Enabled drive mode"); } } }
  3. Make object mass not affect other objects

    Weird. Only errors are from Post proccessing by Unity which I suppose is normal cause some effects aren't avaible on personal edition of the engine.
  4. Make object mass not affect other objects

    The weird thing is that it works fine when I'm at editor but when i export it, it messes up. Alsomass of the ship is 33k and mass of fthe player is 10
  5. Hi. So how could a code a script or any other way to make player's mass not affact my buoyancy ship. (Ship leans to one side when player stand there)
  6. Not copying project correctly

    I will try to record it as soon as i have some time cause im going on vacation now.
  7. Not copying project correctly

    No it wasn't.
  8. Not copying project correctly

    Im pretty sure it the correct folder and I am 100% sure that it saved correctly cause i opened it many times and changed nothing, just to test the game.
  9. Not copying project correctly

    So everytime i make a backup of a project (I copy folder of the project), when i open the backed up project, there aren't the changes i made last. Its like some major changes behind.
  10. Detect when colliders touch

    Im so stupid.. I thought all the time that shot was the required tag of an object.. I guess i miss-wrote that into name.. Thanks
  11. Our Team Logo, NEED OPINIONS

    I don't know why but it looks a little unprofessional in my opinion.
  12. Detect when colliders touch

    I have a problem that when two colliders touch, the script doesn't do anything. These two colliders in my game only touch, one doesn't enter another. public bool isTouching = false; public float maxDistance = 0; // Use this for initialization void Start () { } void OnCollisionStay (Collision collisionInfo) { if(collisionInfo.gameObject.name == "shot") { print(gameObject.name + " collided with another object"); } }
  13. My player glitching on moving collider

    Thanks guys. I will try these options as soon as I have enough time and let you know if it works.
  14. My player glitching on moving collider

    Oh and this doesn't happen to any other object. Just the FPS controller.
  15. My player glitching on moving collider

    What do you mean by this? - and ++?
×