Quantcast
Browsing all 91 articles
Browse latest View live

Answer by belvita

Try this this.gameObject.rigidbody.AddForce(transform.right*50); Or change transform.right to ur required direction

View Article


Answer by belvita

u need 2 show some code .How u want the character to move ? when u press a key? show some codes

View Article


Answer by belvita

u must do like this, without the word new u will get that error okay!hope i haave helped u please vote,thank u Vector3 temp=new Vector3(transform.position.x,charControl.height -...

View Article

Answer by belvita

Check if either ur plane game objects. Is trigger option is enabled on the inspector if yes uncheck is trigger If u are using first person controller they have attached colliders so that is not a...

View Article

Answer by belvita

Of course it is possible. function Update () { var hit : RaycastHit; if (Physics.Raycast (transform.position, -Vector3.up, hit,1)) { var distanceToOtherobject= hit.distance; Distancereached=true; } }...

View Article


Answer by belvita

you mean u want to get the world coordinates? if yes then: GameObject x=Instantiate (prefab, new Vector2(Input.mousePosition.x, Input.mousePosition.y, Quaternion.identity); public Transform target;...

View Article

Answer by belvita

use void OnTriggerStay only

View Article

Answer by belvita

ok done for you attach this script 2 ur camera create a prefab in unity and attach the object that u want to instantiate to that prefab then after attaching the code below to camera drag your prefab to...

View Article


Answer by belvita

Unity can not find the object you want to create ,check ur code carefullyc.check if u attached ur prefab to a public variable from inspector if u using prefabs

View Article


Answer by belvita

Try to convert ur java script code to c# code and access gamenumber variable from ur converted c# code.

View Article

Answer by belvita

Esselam. what you mean by slow? .does it run slow during runtime or in the development view? Ur computers specs r high enough 2 meet all da requirements to run unity fast

View Article

Answer by belvita

**Put the code below inside Update function havent tested the code but it should work** public GameObject mygameobject; if(Input.GetKey("w")) {...

View Article

Answer by belvita

r u using fpc(firs person controller?) if yes bring him up on the scene view until its bottom doesnt collide with ur platform and also the FPC has its own collider so click on FPC on the right side...

View Article


Answer by belvita

create a folder in unity where ever u like click on Assets select import new Asset then find your model,animation ,what ever u want to import

View Article

Answer by belvita

when the player clicks on the object the object is plane very thin like in 6nmBj.jpg file then when the player clicks on it u can do: transform.localScale += Vector3(0,0,0.1); increase the scale of the...

View Article


Answer by belvita

use this instead of !transform.renderer.isVisible): //disable it from view gameObject.renderer.enabled = false; //also disable the gameobjects collider gameObject.collider.enabled =false;

View Article

Answer by belvita

Did you even instantiate these objects on runtime? If not they do not even exist so unity can't find them.i dont c that u did instantiate any gameobjects.

View Article


Answer by belvita

Can u try like this: inside update function if (Input.GetMouseButtonDown(0)) { // when button clicked... gui = "no"; } RaycastHit hit; // cast a ray from mouse pointer: Ray ray =...

View Article

Answer by belvita

u can use this if( Physics.Raycast( ray,out hit) ) { if(hit.collider.gameObject.tag=="urcharacter") { oncharacter=true; } else{ oncharacter=false; } private void OnGUI() { if(oncharacter==true) { //...

View Article

Answer by belvita

change if(other.name=="player") to other.gameObject.tag=="player" please vote me if it works ,thank u

View Article
Browsing all 91 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>