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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!