Quantcast
Channel: Questions in topic: "vector3.position"
Browsing latest articles
Browse All 95 View Live

Tilt an object with arrowkeys

Is it possible to tilt my vehicle tilt and then restore the position? This is the code I got so far, try to edit it please. static var selectedId : int; static var speed : int = 90; function Update ()...

View Article



Problem with WorldPointToScreen

I'm current working on a 3D space flight sim. I'm trying to have an objective system where you can set a waypoint with a Vector3 and it'll display a texture when you look at that position. So right now...

View Article

Vector3.Slerp normal

So I've started to mess around with slerping, and I understand how SLerp works where Vectors are treated as directions instead of as world positions. I have everything working the way I want it to,...

View Article

Assets/follower.js(23,61): BCE0019: 'position' is not a member of 'Object'....

HELP ME var spawnPoints:Transform; private var waypoint=new Array(); private var mesafe:float; private var sayac:int=0; function Start () { var i=0; for (var child:Transform in spawnPoints){...

View Article

Skips off block when landing

So, while back I created a game which is voxel based, and it is similar to minecraft. But like i said, the odd thing is since the beginning I slip off a block when I land to the little part of it. and...

View Article


Random.Range Vector3

I'm wondering if there's a simple way to generate a random Vector3 given maximum and minimum Vector3's. So far what I've been doing works, but it seems clunky. Is there a better way? var minPosition :...

View Article

How do I add a vector3.lerp or movetoward

Not answered fully yet constantly updated. I have a game object that has 10 specific cord positions (specific coordinates located below declared var. I need it to move randomly between these positions...

View Article

transform position of object in runtime

Hi, I'm trying to transform position of object in runtime, when I click on it, by this line > transform.position = new Vector3(20F,0F,0F); or > transform.localPosition = new...

View Article


How would I clamp a balance board? Mathf.clamp does not work!

I've gotten a balance board ALMOST working. However... the mouse controls for it aren't really cooperating right, and I need to clamp them. I tried a Mathf.Clamp and ran into an immediete problem: From...

View Article


How to sync Inspector actions to objects rendered on screen?

I'm trying to construct an Editor where Sprites are added to a list in the Inspector, but I don't really know where to start. There are 2 main functions I would like it to support: Updating the Sprite...

View Article

Why is Instantiated object not updating variable?

I have an instantiated object that keeps track of the player's position using this code: public GameObject player; void Update () { Vector3 playerPos = player.transform.position; Debug.Log(playerPos);...

View Article

movement transform limit ?

ask againn.. need help when i use this scipt var robot: Transform; private var checkgui= false; private var2 checkgui= false; function Update() if ( checkgui==true) Input.GetKeyDown(KeyCode.Q)) {...

View Article

How do I make Visualizer Studio modify the value of a property relative to...

I'm using Visualizer Studio to make game objects react to the music that plays in the level. The Asset is great and has a lot of features, but for my current project it may need a little modification....

View Article


Alien Swarm Control with Mecanim

Hi, I'm trying to build a player controller like the Angry Bots or Alien Swarm. The LookAt script is working but when rotating is rotating the entire player object. I want only the Body ( torso ) of...

View Article

Problem Vector3.transform (C#)

using UnityEngine; using System.Collections; public class characterMovement : MonoBehaviour { // Update is called once per frame void Update () { if(Input.GetKey(KeyCode.W)){ transform.position +=...

View Article


Vector3 position of a sloped point at edge of screen

Based on the picture shown (my awesome artwork), I want to create HUD objects (the red squares) that slide along the edge of the screen on the slope of the imaginary (blue) line drawn from the enemy...

View Article

areas(continents) on my spherical planet

Hey everyone, after messing around in unity for a while, i'v decided to start a real project.. For my new project i'm using a cube that is mapped to a sphere. ![alt text][1] ![alt text][2] [1]:...

View Article


find vector3

![alt text][1] [1]: /storage/temp/45788-how-to-find.jpg anyone can help me? how to find vector3 value about this pict?

View Article

how to compare position.x last position to current?

Hi, I wanted to compare the last position with the current position of my player. Here's my current code: public GameObject player; Vector2 lastPos; Vector2 currentPos; void Update(){ currentPos =...

View Article

How to find IndexOf vector3 List ? position search

Hi community I got a problem to find the index number of an vector3 list. Inside the vector are gameobject's with their position. rotesSpielFeld = new List();...

View Article

recalibrate players Y

I got this script from the forums and modified it a bit to fit my needs. So if the player falls a certain distance, it triggers the" falling" loop animation where the player flails around, and when he...

View Article


How can I transform 3 objects to swap positions, but make sure they aren't...

I have applied a code to 3 objects. So far this code switches three cups around so that they swap places. The code gets the start position of the cup, and then the end position of each cup. All 3 end...

View Article


difference between transform.forward and vector3.forward

Hello, I'm learning unity C# and i'm confused between transform.forward and vector3.forward, please teach the difference between these two, here is the code i'm trying and they both giving different...

View Article

Passing Vector3 to Method ?

I'm trying to pass a Vector3 location to a method and am getting "Expression denotes a `type', where a `variable', `value' or `method group' was expected" as an error. Below is the gist of what I would...

View Article

Removing Vector3 Decimal for Position

Hey there guys, I've tried to do my research on this but had no avail, only things in relation to distance which i could not incorporate into what i wanted to achieve.. This is for a NavMesh AI that i...

View Article


move a player at specific distance to road lanes

I am currently creating a five lane highway style that has the character gameobject move to the next right lane on on right button click and the previous left lane on left button click the following is...

View Article

,How to store multiple Vector3s inside of a single variable every frame?

Hi all. -- I am building an interactive VR experience using the HTC Vive and the SteamVR Unity plugin. My experience involves navigating a space filled with "Sound Spheres" that generate sound when...

View Article

Making a vector3 z coord have a zero on reflect?

Right so before you laugh at my silly question lets get the laughs out of your system with a joke.... why did the chicken fall through the world?.... cause he wasn't rigid body enough HAHAHA........

View Article

Instantiate Gameobjects in the mid position across several targets without...

Hi! I have a GameObJect which instantiates several spheres as children. What I'm trying to achieve is that those spheres are instantiated in the mid position across two targets without the spheres...

View Article



How to All instantiated objects to change position if any object hits defined...

Hello all, Im new to Unity... but trying to do something "easy" and make a space invaders type game (to help me learn to code here).... pretty easy but am having issues having All instantiated objects...

View Article
Browsing latest articles
Browse All 95 View Live




Latest Images