Quantcast
Channel: Answers by "IvovdMarel"
Browsing all 145 articles
Browse latest View live
↧

Answer by IvovdMarel

You can create easing by creating a speed variable and a speedReduction (friction) and speedIncrease (force) variable for the camera. In order to rotate smooth;y to a next object you can use the...

View Article


Answer by IvovdMarel

Storing information just so it persists between scenes does not require a database. Storing information online and sharing it with others does require at least a simple form of a database. What you're...

View Article


Answer by IvovdMarel

1) Two versions of the app can share versions, by storing the data on a server. This can be your own server, but since then you'd have to create a whole login system, you might want to consider...

View Article

Answer by IvovdMarel

That's the answer: You should check if( hit.transform.gameObject == this.gameObject) (If you just check hit, it will be destroyed whenever your raycast hits anything)

View Article

Answer by IvovdMarel

Destroy(transform.parent.gameObject)

View Article


Answer by IvovdMarel

Use a foreach loop through this.getcomponentsInChildren(). If you'd like to do this permanent, make sure your scripts executes in edit-mode

View Article

Answer by IvovdMarel

private void OnApplicationPause (bool pauseStatus) { if (pauseStatus) //Do something }

View Article

Answer by IvovdMarel

Check out Invoke or InvokeRepeating

View Article


Answer by IvovdMarel

If you want your camera to follow your character (like in an RPG) it's easiest to create a gameobject called 'CameraTarget' and child it to your character. Move the target behind the character as far...

View Article


Answer by IvovdMarel

If you want to make the player jump, think about what happens what actually happens when you jump. A force gets added at the moment you push yourself away from the ground, but no extra force gets added...

View Article

Answer by IvovdMarel

Rather than adding force, you can directly set the velocity. This way, the jump height is not dependent on the characters current force. (e.g. if the character is falling fast, a jump with AddForce...

View Article

Answer by IvovdMarel

Start from this? float speed = 0.01f; float distance = 0; Vector3 mousePos; void Update () { if (Input.getMouseButtonUp(0)) { mousePos = GetMousePosHit(); } if (distance >= 1) { distance = 1;...

View Article

Answer by IvovdMarel

You can set a fixed angle: http://docs.unity3d.com/ScriptReference/Rigidbody2D-fixedAngle.html

View Article


Answer by IvovdMarel

http://www.alteredr.com/visualizer-studio/

View Article

Answer by IvovdMarel

The ship gets instantiated but ship.GetComponent() = null. This means your ship does not have the component SpaceShip_Trader attached to it, because your prefab (spawnableShip_01) does not have it.

View Article


Answer by IvovdMarel

static var counter; How can your compiler know that this is an int? You have to define it as an int- static var counter = 0; or even better static var counter : int = 0; This is why I don't like...

View Article

Answer by IvovdMarel

Hi, Creating (and sharing) maps is mainly different than regular gameplay because you'll have to save & load the data from a file. The best format for this would be JSON. What you'd need to do is a...

View Article


Answer by IvovdMarel

http://docs.unity3d.com/ScriptReference/Texture-wrapMode.html

View Article

Answer by IvovdMarel

Try changing transform.rotation to transform.localRotation

View Article

Answer by IvovdMarel

Your method should be called Update not update Also use if (colorState == ColorState.Mana) { renderer.material.color = Color.yellow; Debug.Log("this happened"); }

View Article
Browsing all 145 articles
Browse latest View live


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