Quantcast
Channel: Answers by "TomPendergrass"
Browsing latest articles
Browse All 45 View Live

Answer by TomPendergrass

I just recently added this functionality to my video game (arxcatalyst.weebly.com) Although I'm programming my character control script from scratch and haven't really used the character controller,...

View Article



Answer by TomPendergrass

You can use Mathf.Clamp on the rigidbody.velocity values after the force is applied to determine speed caps.

View Article

Answer by TomPendergrass

It's useful to outline all that your scripts have to do in order to achieve it's purpose. For an enemy retaliating to the player, it would have to: A:) acquire the target (player.transform) B:) Aim at...

View Article

Answer by TomPendergrass

Have you tried using a Mesh Collider? It's the most expensive physics calculation, but it uses your mesh topology as collision surfaces.

View Article

Answer by TomPendergrass

I believe you're searching for BarkyStatus script only on the object this script is attached to. Try searching the owner object for the compenent. player : GameObject; //Your player goes here! barky =...

View Article


Answer by TomPendergrass

underneath the edit menu is a submenu called project settings. In that menu is input. this is where input is controlled. You can add your own controls here! also, you can do Input.GetKey("i");

View Article

Answer by TomPendergrass

You mention that your character falls through the ground. is your character a rigidbody? if so, using transform.MoveTowards() will not work well with the physics engine. instead, you can try...

View Article

Answer by TomPendergrass

you can use OnTriggerEnter to set a boolean. then in an update function in your script, if the input is down and the boolean is true, then you can teleport. var usable : boolean = false; var lastPlayer...

View Article


Answer by TomPendergrass

animation events run functions. create a function like this: function PlaySound() { audio.Play(); } and then put that function in the animation event.

View Article


Answer by TomPendergrass

I've done this before; I had to essentially allow a character to walk on the inside surface of a wheel. I don't have the exact code, but essentially what you need to do is a Physics.Raycast down from...

View Article

Answer by TomPendergrass

I admire your will to create things yourself. I do the same thing with the video game I'm developing, (arxcatalyst.weebly.com). Lets see if I can cover all the bases of your question. To access another...

View Article

Answer by TomPendergrass

You'll want to put all of your painting into a texture that unity can use on the object I assume. If it looks good when you render it in Blender (my favorite 3D software :D ) then all you've got to do...

View Article

Answer by TomPendergrass

You can use function OnMouseOver() to do things in code on an object. It works very well, just know that it only detects Colliders and GUI Elements. I don't think it works on text, but all you have to...

View Article


Answer by TomPendergrass

Hello crilose. I do a lot of character animation for the game I'm working on right now ([arxcatalyst.weebly.com][1]), and I've come across your problem in the past. The reason the animation wrap mode...

View Article

Answer by TomPendergrass

direction = character.transform.right; character.transform.position += direction * speed * Time.deltaTime;

View Article


Answer by TomPendergrass

In most video game engines, only one side of a polygon is rendered. This side is determined by a face's normal direction. Try flipping/recalculating the normals of your model and reimporting it....

View Article

Answer by TomPendergrass

I'd suggest using an integer that increases everytime a player joins (and decreases when a player disconnects) then use that as your array key. for instance: var playerCount : int = 0; var spawnPoints...

View Article


Answer by TomPendergrass

I haven't done the tutorial, but you could insert this into the function that causes the enemy to die: yield WaitForSeconds(15) gameObject.Destroy();

View Article

Answer by TomPendergrass

I do believe that for OnCollisionEnter and OnTriggerEnter to work, at least one of the colliders must be a rigidbody. I would suggest setting your platform to a kinematic rigidbody. Setting it to...

View Article

Answer by TomPendergrass

use a flare.

View Article

Answer by TomPendergrass

Look up Instantiate in the scripting reference.

View Article


Answer by TomPendergrass

I know this is way late, but a possible solution for you is to instead use the skinned cloth renderer: [http://docs.unity3d.com/Documentation/Components/class-SkinnedCloth.html][1] It won't interact...

View Article


Answer by TomPendergrass

A better answer is to use ClampMagnitude. Normalizing your movement vector will always restrict it to a magnitude of 1 (or zero if the vector's magnitude is too small). ClampMagnitude on the other hand...

View Article
Browsing latest articles
Browse All 45 View Live


Latest Images