Jump to content
  • Advertisement

JuliaAxt

Member
  • Content count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About JuliaAxt

  • Rank
    Newbie

Personal Information

  • Role
    Programmer
  • Interests
    Education
    Programming
  1. JuliaAxt

    Unity coding error

    It is at the point in the game when the character reaches a 'deadzone' and the player dies. I hope im clear enough
  2. JuliaAxt

    Unity coding error

    Thank you!
  3. JuliaAxt

    Unity coding error

    I totally respect this rule. The problem is that my teacher is a beginner just like me. I would appreciate all possible help
  4. Please help me with this code, this error is currently stopping my project using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(Rigidbody2D))] public class TapController : MonoBehaviour { public float tapForence = 10; public float tiltSmooth = 5; public Vector3 startPos; Rigidbody2D Rigidbody; Quaternion downRotation; Quaternion forwardRotation; private void Start() { Rigidbody = GetComponent<Rigidbody2D>(); downRotation = Quaternion.Euler(0, 0, -90); forwardRotation = Quaternion.Euler(0, 0, 35); } private void Update() { if (Input.GetMouseButtonDown(0)) { transform.rotation = forwardRotation; Rigidbody.AddForce(Vector2.up * tapForce, ForceMode2D.Force); (The name `tapForce`does not exist in current context) } transform.rotation = Quaternion.Lerp(transform.rotation, downRotation, tiltSmooth * Time.deltaTime); } } void OnTriggerEnter2D(Collider2D col){ if (col.gameObject.tag == "scoreZone") { // register a score event // play a sound } if (col.gameObject.tag == "deadZone") { Rigidbody.simulated = false; (`Rigidbody` does not contain a definition for `simulated´) //register a dead event //play a sound } } }
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!