Quantcast
Channel: Latest Questions by Turkeybag
Browsing all 27 articles
Browse latest View live
↧

A way for a trigger to detect if anything is in it?

Hard to describe what I mean in the title but can you get a trigger to do something if anything is in it. Say that the player is on a space ship with artificial gravity, and if anything enters a...

View Article


Function being called twice when it shouldn't be

Alright so I've got a jump function and for some reason it can be called more then once (causing superjumps). This happens more often on hills. Problem is my code shouldn't even let that happen so I...

View Article


Calling a function in another script not working with yield

Alright so upon finding out sendmessage can only send 1 parameter I found an alternative: InstantForce = Target.GetComponent("CharacterMovement"); InstantForce.InstantForce(100.0, ExplosionDirection);...

View Article

Make something turn towards something else at a constant rate?

Hey! I have a flying orb that is constantly trying to laser the player. However I want him to turn at a constant rate and he does not. He turns slower the closer to the player he is. RotationVar =...

View Article

Clone Objects treating static variables strangly

Hey guys! I have an enemy that will duplicate itself every now and then. Whenever one is created I have a static variable "DupeMobCount" that increases by 1, and when they are destroyed, it decreases...

View Article


Jumping problem to do with /= magnitude changing the vector3 direction

So I made my own character controller using a rigid body and it works pretty much perfectly. One of the main reasons I made it was so the player could change their speed while in mid air as being air...

View Article

Having trouble understanding parenting with componants

Alright so I'm having a hard time getting things to work with parenting due to one reason, I can't wrap my head around the way it works. It's just so seemingly inconsistent that I can't figure it out....

View Article

Rotate on X axies towards an objects height in 3D

Pretty much what I need to do is simulate an AI looking up and down in the same way that players do (with a separate object). Something like the AIs head looks up and down at the player but doesn't...

View Article


Layers, parenting and collisions.

So I have a parent object on a different layer to it's child. They both have box colliders. Here's what I'm trying to do with it: Layers I'm using and how they are set up in the layer collision matrix:...

View Article


Multi sprite characters order themselves as a whole rather than as individual...

So I have a bunch of zombies that are made out of several sprites so that it's easy to animate and change parts around. The zombies themselves layer fine but when multiple zombies are near each other...

View Article

A way to optimize moving a huge group of colliders at once

I'm making a 2D top down game where the player runs around and random segments will spawn so that they are constantly surrounded by a 3x3 group of segments giving the illusion of an endless map. These...

View Article

Navmeshagents stopping for no reason.

Hey! So I was testing some things with navmeshs and when I had 52 agents at once all calling Agent.SetDestination(PlayerTransform.position) in the update functon, the agents would all stop for a short...

View Article

Problem getting player to switch navmesh layers

Alright so I have a character and my navmesh is set up into two layers. Default which the player can always walk on and phase (user layer 0) which the player cannot walk on usually. What I want to do...

View Article


A way for a trigger to detect if anything is in it?

Hard to describe what I mean in the title but can you get a trigger to do something if anything is in it. Say that the player is on a space ship with artificial gravity, and if anything enters a...

View Article

Function being called twice when it shouldn't be

Alright so I've got a jump function and for some reason it can be called more then once (causing superjumps). This happens more often on hills. Problem is my code shouldn't even let that happen so I...

View Article


Calling a function in another script not working with yield

Alright so upon finding out sendmessage can only send 1 parameter I found an alternative: InstantForce = Target.GetComponent("CharacterMovement"); InstantForce.InstantForce(100.0, ExplosionDirection);...

View Article

Make something turn towards something else at a constant rate?

Hey! I have a flying orb that is constantly trying to laser the player. However I want him to turn at a constant rate and he does not. He turns slower the closer to the player he is. RotationVar =...

View Article


Clone Objects treating static variables strangly

Hey guys! I have an enemy that will duplicate itself every now and then. Whenever one is created I have a static variable "DupeMobCount" that increases by 1, and when they are destroyed, it decreases...

View Article

Jumping problem to do with /= magnitude changing the vector3 direction

So I made my own character controller using a rigid body and it works pretty much perfectly. One of the main reasons I made it was so the player could change their speed while in mid air as being air...

View Article

Having trouble understanding parenting with componants

Alright so I'm having a hard time getting things to work with parenting due to one reason, I can't wrap my head around the way it works. It's just so seemingly inconsistent that I can't figure it out....

View Article
Browsing all 27 articles
Browse latest View live


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