Quantcast
Channel: Answers by "Mortoc"
Browsing all 73 articles
Browse latest View live
↧

Answer by Mortoc

Typo in the function name: OnControlerColliderHit should be OnControllerColliderHit

View Article


Answer by Mortoc

Well, moving is getting set to true and it's defined outside the scope of MoveFromTo. That means the 2nd call to MoveFromTo doesn't do anything.

View Article


Answer by Mortoc

I'd start by looking at Lua. It's a pretty common modding language and it's pretty easy to set up in Unity. http://www.dannygoodayle.com/2013/05/31/integrating-unity-with-lua-in-two-minutes/

View Article

Answer by Mortoc

I've gotten this a few times too. If you navigate to your Documents folder (C:\Users\nmona_000\Documents), right-click it and hit Properties. In there, uncheck readonly under Attributes and make sure...

View Article

Answer by Mortoc

Nope, you can't block while waiting for a Web request, nor would you want to (your app will appear to have crashed). You can split your app in to 2 scenes, 1 would be the loading scene that does the...

View Article


Answer by Mortoc

Instead of myTransform.Translate (Vector3.up * lightningSpeed * Time.deltaTime); try: myTransform.Translate (transform.forward * lightningSpeed * Time.deltaTime); This uses the forward vector on the...

View Article

Answer by Mortoc

Right now your scripts are modifying transform and rigidbody. You want to modify one or the other per-gameobject, not both. Also, any modifications to rigidbody should be done during the Physics...

View Article

Answer by Mortoc

// assuming the ground is on it's own layer called 'ground-plane' int mask = 1 << LayerMask.NameToLayer("ground-plane"); // get the 2 camera-corner rays Ray topRightRay =...

View Article


Answer by Mortoc

Photon and SmartFox are for synchronous communication; real-time multiplayer games. Web services are used for asynchronous communication; high score saving, login systems, etc. If your need is...

View Article


Answer by Mortoc

You want to detect direction of vectors by using the dot product. if( Vector3.Dot(transform.forward, Vector3.forward) > 0.0f ) // dude is walking forward Here's a pretty clear way to learn about dot...

View Article

Answer by Mortoc

I see a couple problems: - ToList returns an object of Type List and you're attempting to assign it to a Transform[]. - ToList(Transform) should read ToList(transform) (get the instance name, not the...

View Article

Answer by Mortoc

You'll need a couple things. 1. An efficient way to detect proximity. [Physics.OverlapSphere][1] or just colliders set as triggers are good for this. This is so you can say, "Enemy is close to player,...

View Article

Answer by Mortoc

It is very easy to copy any object. Use [UnityEngine.Object.Instantiate][1] You can also procedurally move things around very easily in unity: "GameObject.transform.position = someVector3;" You can...

View Article


Answer by Mortoc

How is the font asset saved? if it's not, maybe try forcing it to import as Unicode instead of dynamic.

View Article

Answer by Mortoc

What sort of DLL are you talking about here? A .net DLL can just be dragged in to unity (assuming it doesn't have any weird requirements like System.Windows). If it's a native dll (from C++ or...

View Article


Answer by Mortoc

The *most* efficient way would be to use option 2 (GUITexture with alpha across the screen) for a single frame, setting the camera to not clear out the display buffer and then disable rendering of...

View Article

Answer by Mortoc

I'm not sure why the script wouldn't compile straight out of the box, but the compile error looks simple enough to fix. It's an interface you implement rather than a base class to extend. You can use...

View Article


Answer by Mortoc

It would look something like this. You could put this script on a GameObject and in the editor set up as many units in that array as you want. I do recommend using better names than I did: public class...

View Article

Answer by Mortoc

Sounds like z-fighting. Try using a shader that includes an offset. Simple example: Shader "No More Z Fighting/Foreground Element" { Properties { _MainTex ("Main Texure (RGBA)", 2D) = "" {} } SubShader...

View Article

Answer by Mortoc

There's a couple different things going on in From Dust, but I think the basic thing you're looking for is the [Marching Polyhedrons][1] algorithm. It's used to generate a 'shell mesh' over a point...

View Article
Browsing all 73 articles
Browse latest View live


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