Quantcast
Channel: Latest Questions by betaFlux
Browsing latest articles
Browse All 30 View Live
↧

How to properly use blendshapes via script? (c#)

Hello, I need advice on how to script blendshape animations. What I try to do is, making a 25000 polygon female model blink with her eyes, in random intervals. The blendshapes are all showing up...

View Article


Best method to set a random position on NavMesh? (c#)

Hello! Some time ago, I wrote a little method that finds and returns a random point on a plane or terrain the renderer.bounds.size-way. I use it to randomize my navMeshAgents destinations, to make them...

View Article


Mecanim ruins custom animations

Hello Community! I made a set of walk animations in Cinema 4d and in there they look acceptable for my needs. Problem is for whatever reason, the Mecanim avatar system doesn't seem to like my...

View Article

How to make builtin Component Inspector Settings available on Custom Component?

Hello, I have a portal script on an empty gameobject in the scene that spawns character prefabs with the 'NavMeshAgent' component attached. Is it possible to make certain builtin NavMeshAgent Settings...

View Article

ArgumentNullException when instantiating prefabs using generic list

Hi, I'm lost with this. I'm sure I did everything right but I get an 'ArgumentNullException: Argument cannot be null.'-error when I start the game. using UnityEngine; using System.Collections; using...

View Article


Legacy Animation Walk Speed relative to Movement Speed

Hello, I am calculating the movement speed of a navmesh agent like this: float currentSpeed = 0; Vector3 currentPosition = Vector.zero; Vector3 lastFramePosition = Vector3.zero; void Awake() {...

View Article

How to store Gizmo (grid) Cube positions in Vector3 list at game start?

I have written this script to create a grid of gizmo cubes: using UnityEngine; using System.Collections.Generic; public class Grid : MonoBehaviour { public int[] rows; //public int[] columns; //not...

View Article

Need Help adding Main Color Property to a complicated Shader

Good day! I have gotten my hands on a great hair shader, the best i've ever seen so far. Now **I need to change the main color**, but I don't have a clue how this can be done. I googled a lot and tried...

View Article


Random.insideUnitSphere doesn't work as expected

Does anyone know why this snippet returns a position around world space zero? (the transform is a child) float radius = 5; float zDistance = 5; targetPosition = new Vector3(Random.insideUnitSphere.x *...

View Article


Constant Transform Lerp

Is it bad practice to let a transform constantly re-position and rotate itself to a target with Vector3.Lerp and Quaternion.Lerp? For example: Camera.main.transform.position =...

View Article

Incorrect usage of Vector3.Dot?

Hello, I am trying to make a game similar to Rimworld or Prison Architect, so I have a AI controlled sprite character with 4 different sprites for each main direction and I'm currently trying to...

View Article

zoom problem with GUI Box that follows a character

I have a GUI box following a sprite character in a 2d Top Down Game. If I zoom in, the GUI box goes up, if I zoom out, the GUI box moves down, instead of staying at the point it was drawn at game...

View Article

Array = null when passing as parameter

Straight to the point. The following code is in a script that executes before all other scripts: public static AudioClip[] FootstepSounds; void Start() { FootstepSounds = Resources.LoadAll("Sound...

View Article


How to add one onClick Event to multiple UI buttons

Hello, I must be missing something essential here. This is what I've tried: void Start() { // Assign the callback to all buttons foreach(Button subbutton in canvas.transform.GetComponentsInChildren())...

View Article

UnityEditor GenericMenu - Problem with 'AddItem' in Foreach Loop

I'm working on a custom inspector and I'm trying to populate a GenericMenu with the content of a string array like this: public override void OnInspectorGUI() { if(GUILayout.Button("Add Type")) { var...

View Article

Browsing latest articles
Browse All 30 View Live


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