Answer by hoekkii
What is happening now, is that the raycast detects de player itsself, so it is always grounded. So you need to add a LayerMask, so the raycast doesn't detect the player. After adding this it looks like...
View ArticleAnswer by hoekkii
no they're not moving/bending maybe there is a way by doing it by scripting, by placing the trees induvidual (not using the unity terrain tool) with an mesh collider, and move the verts. But I think...
View ArticleAnswer by hoekkii
I made something. if you don't understand how to use, leave a comment using UnityEngine; using System.Collections; public class Character : MonoBehaviour { private Transform t = null; public float...
View ArticleAnswer by hoekkii
Add this on line 3: using UnityStandardAssets.ImageEffects; so the script would look like this: using UnityEngine; using System.Collections; using UnityStandardAssets.ImageEffects;...
View ArticleAnswer by hoekkii
Create a C# script, copy and paste this (Make sure class name and script name are the same, so replace h_BalloonController to the script name) and attach it to your balloon. change mass and gravity...
View ArticleAnswer by hoekkii
I guess something like this, I would not recommend this structure. Maybe use a tween library or create your own, for easier aborting and stuff. Note I did not test this, but it should work. static bool...
View ArticleAnswer by hoekkii
Reflection does not care about function overloading. Instead use `Type::GetMethods : MethodInfo[]` instead and make a function like this: public static void SafeInvoke(this MethodInfo[] methods, object...
View ArticleAnswer by hoekkii
Readability is most of the time more important than efficiency, but first of all some feedback on your code:You should initialize objects inside `Awake`.Why don't you remove items from the list? This...
View ArticleAnswer by hoekkii
Personally I would go for a different approach, since the speed to angle conversion is not linear. But first of all some suggestions:Try avoid duplicate code `PIN.transform.localEulerAngles = new...
View ArticleAnswer by hoekkii
Short answer: public static void Normal2PitchYaw(Vector3 normal, out float pitch, out float yaw) { yaw = -Mathf.Asin(normal.x) * Mathf.Rad2Deg; pitch = Mathf.Atan2(normal.z, normal.y) * Mathf.Rad2Deg;...
View Article