Quantcast
Channel: Latest Questions by hardmode2236
Browsing all 112 articles
Browse latest View live
↧

navMeshAgent with rigibody (non-kinematic)

I have some basic cubes walking across a navmesh with navMeshAgents but they also have rigidbodies because i want them to be able to be pushed, or tossed around, then get their bearings and continue...

View Article


IK aimer (imported from blender)

i made a pretty simple turret in blender, and it aims just fine in blender using an IK constraint. but once i import it into unity it doesn't aim when i move around the IK target. is there some setting...

View Article


aiming a transform on one axis.

this is a recurring mechanic for me, whats a good, fast way to aim at something along only one axis? as for right now i just use transform.LookAt() then zero out the 2 unused axis. this seems like a...

View Article

input keeps resetting.

every time i close, then reopen my project, all of the custom input buttons i created in the input manager are gone. i did save before i restarted it, so i don't see why its doing this.

View Article

how to make the cursor ACTUALLY lock

no cursor locking iv ever tried, or cursor visibility has ever done anything for me.. do they just not work when i'm running the game through unity, do they only work on full builds? cursor visibility...

View Article


animation window, yellow text after moving Animation component

after moving my animation component for my character from his hands(don't ask, i don't know why i put it there) to the top of his hierarchy, all the animations have missing properties. they are all...

View Article

size of a spherecast?

is a SphereCast's radius the same as a sphere collider's radius, if it where on a object with (1,1,1) scale? just trying to understand sphereCasts a little better, since there's no Debug.DrawSphereCast...

View Article

array resetting after enabling a disabled gameobject

my bow script has an array of arrows with length of 3, the bow starts disabled; then when i enable it the array is length 0. i even have this line in Start(): arrows = new Rigidbody[3]; and arrows...

View Article


why do complex objects made from many rigidbodys jointed together explode on...

example: right now i have a big ol tree, 16 segments all connected to end to end in a line sometimes when i fell the tree when it hits the terrain collider it just explodes like crazy and the various...

View Article


setup grid layout group to expand from the center

is it possible to set a grid layout group to expand from the center, so when i add to the group it will expand left AND right / up AND down, instead of just expanding left OR right / up OR down? i mean...

View Article

Dictionary.TryGetValue for js

I'm trying to use a dictionary's TryGetValue in js, but i would need to pass a variable by reference. though it seems js cant use 'ref' or 'out' to pass by reference. line in questions is like this:...

View Article

object can't be null when highlighted in the inspector?

Long story short: I have an inventory system that works fine, until I highlight one of the slots in the inspector during run-time, thus, exposing the 'item' object in the inspector. My code checks for,...

View Article

javascript, default object comparator

i have a simple buff class and a generic list full of buffs. and i need to sort them but the [reference for the list's sort function][1] says: "Sorts the elements in the entire List using the default...

View Article


Emit Random Particles?

I have a particle system that doesn't emit anything, i only use it's emit() function at specific times to get bursts of particles. Is there any way to have it choose randomly between two different...

View Article

y and z rotation axis doing the same thing when x is 270 degrees

this has got to be the most annoying thing ever.... when the x axis rotates towards perpendicular with 0 degrees, the y and z axis become more and more similar until they do the same exact rotation...

View Article


raycast not detecting my mesh from blender

long story short, i imported a multipart mesh as a .blend file, i gave all its parts a rigidbody, mesh collider(convex), and a fixed joint to connect them all together. each individual peice is set to...

View Article

particle system stops normal emissions after .emit() is called

i have a particle system with an emission rate set to 3, its works up until i call its emit function with 25 particles. then it just stops, and nothing will turn its normal 3 emission back on except...

View Article


trouble getting all children into an array.

I'm trying to get all the children of an object into a Transform[] variable like so: #pragma strict var tiles:Transform[]; function Start () { tiles = gameObject.GetComponentsInChildren(Transform) as...

View Article

moving a transform by 10 but it goes exra...

this has me totaly stumped. im telling my camera to move down 10 like so: function initCam() { cam.transform.position.y = -10; } and for some reason when i test the app it goes from 0(its starting Y...

View Article

health bar position formula

I need a formula to position my health bar object as it scales down. i got close but i just couldn't get it right. i scale it down like so: transform.localScale.x = (maxSize*HP)/maxHP; Then on my next...

View Article
Browsing all 112 articles
Browse latest View live


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