Move around object
I have problem with Unity - 2D objects. I want to rotate object around circle and on click translate it (with same angle) outside the circle to another and still rotate. Rotating is working with...
View ArticleHow to implent movement AROUND grid
Hello, Everyone seems to be asking about how to implemnt gridbased movement, where you move form tile to tile. I on the other hand, need to find a way to move on the edges of the grid only (around the...
View ArticleHow to make an AI that moves around
Hey mates, i already made some AI scripts in the past, but i wanted to take another step. I have made an AI that follow the player based on his coordinates, i made an AI that is always looking at the...
View ArticleHow to make Objects so as they do not leave an area around another object
Hello, I need to make it so that some objects do not leave a circular area of which the center is another object. So these objects can have random movement until they reach the boundaries of the...
View ArticleTo send Raycasting to four corners ?
Measure the distance between the mouse click and the box.I am trying to do it using code Vector3.Distance. ![alt text][1] Hi, I click on the object on the grid with the mouse and I want you to show the...
View ArticleRotation around an Object
Hello all , I am having a hard time understanding what this code does : (it was taken from a tutorial but the explication wasn't clear enough to me) I came to a point where I need this code but with a...
View ArticleHow to Rotate camera around object SMOOTHLY when using Input.GetKeyDown
I've searched on the forum and still cant find how to do this, my problem is that i'm trying to make the camera rotate around the character smoothly with GetKeyDown, but that does not seems to work at...
View ArticleWeird charging bug. What is causing it? (I think it's easy, and I'm stupid)
So, I'm totally new to this Unity thing, and I'm trying it out for myself without too many tutorials. My code is probably really stupid. But I can't figure out what is causing this weird bug. When I...
View ArticleGet rotation around (forward) axis ?
How can I read the rotation of a transform/quaternion around a specific axis? edit: optimal would be to have a direction vector AND an angle! Thanks
View Articletank turret rotate without messing up
im trying to make a tank turret rotate, with him i want 2 cameras, and a barrel(a separet object parented to the turret) to rotate, now the problem is when i parrent the objects it will set the center...
View ArticleMake an object move toward a point, but stop when it hits another object?
I'm trying to make something that allows you to grab an object and it will gradually slide toward the mouse which I have done using Vector3.Lerp. This part works fine. I want the object to stop moving...
View ArticleHow To Make An NPC Move When You Look At It
Hello all, I've searched but can't find exactly what I'm looking for, let me be more specific. I have a hospital environment that has several turns/corners the player must walk around. I also have a...
View ArticleMake a character rotate around a point.
Hi I want to create a game where the character is placed in one specific point and only can rotate around it and shoot (something like bubble shooter games) I tryed with joints and...
View ArticleHow do I make the nose/whole of my spaceship move?
Firstly, I don't mean having it move forward. I mean if you go up, the nose of the ship will go up, go left, and the nose of the ship goes left. At the moment, my ship is just stationary on the screen...
View Article2D game turning
How can I make my character turn around to left and right when I press "a" and "d"
View ArticleInstantiate enemies around player
Hey everyone! First post, pretty new to Unity... I've had plenty of experience coding in Flash (AS3) and i know it's pretty similar to Javascript so i'm doin my best to my move skills from one to the...
View ArticleRotate game object around a arbitrary line ( not through origin)
I have a gameobject that needs to rotate around an arbitrary line that does not go through the origin. Any help is greatly appreciated it. Cheers.
View ArticleI want to rotate object away or towards camera around x-axis
Hi Unity people and consumers. Currently working on an controller that can grab stuff and manipulate it. I currently have gotten stuck due to a problem with my rotation function. I want it to be able...
View ArticleHow do i make it so particles go in circle?
For exapmple i want to make a bunch of butterflies circling around the flower, so what must i do? I tried to play with the Velocity over Lifetime but the best i can is to make them go back and forth...
View ArticlePlacing an object around character in 3d space?
Hi! Im trying to make a shield that can be placed around the player, in the player desired position, in the 3d world, in order to block some shots... I was thinking on making a prefb, and instantiating...
View Article