Quantcast
Channel: Questions in topic: "round"
Browsing index pages (87 articles)
↧

Weird behavior with % operator

So i'm calculating some positions and my problem is that this line: Mathf.Abs(Mathf.Round(pos.x * 100) / 100) % (4 * scale) returns 115,6 where it should return 0 (115,6/115,6 should give 1). I thought...

View Article


How to serialize/save a vector3 without all decimals?

First of all I alredy preroundet the decimals to 3 decimals but here is the problem when I serialize the preroundet floats as Vector3:...

View Article


Round control and enemy control issues - Javascript

In the game I'm currently designing, I'm spawning enemies over time and after a certain amount of enemies are spawned/killed (or after a certain amount of rounds), I want the boss to spawn at the top...

View Article

Round Position/ Coordinate to a different coordinate

Trying to do a strictly grid position movement, already looked at some tutorials, and figured out most of the code already but now when I give an input the code sets the player's Coordinate to the same...

View Article

Terrain tool not ROUNDY

This started happening a couple of days back and I don't know why. The terrain tool it's simply not "roundy". When I press to sculpt it's different. I don't know if it's something I clicked on,...

View Article


Problem with textures on round surfaces

I want to design barrel for the game, and problem with materials occurs when adding specular map to make scratches on the barrel. Material in preview looks perfect but added on 3D barrel object it...

View Article

Move 8 cubes depening on what round

Hi everyone ! i have 8 cubes thats around a smaller cube in the center. What im trying to do is to make a cube mov towards the center so that the smaller cube can dodge it and i want to send more cubes...

View Article

Smoothly resize sprite with rounded corners?

I have a rounded rectangle sprite that I need to be resized across a single axis. Right now it's a square, but I will need it to be resizeable on the Y axis without stretching the borders or warping...

View Article


Appear, Disappear problem in VR camera

![alt text][1] This is Camera Component under CameraRig in SteamVR asset. And I'm having problem with sight problem. When looking objects(especially Terrain) near Clipping Planes appear and disappear....

View Article


3 by 1 grid with mathf.round and ScreenToWorldPoint

Hello! I want to make a game where I place platforms, and then the automatic runner jumps onto it, but my problem is that my platforms are 3 by 1 and not 1 by 1. Then the Mathf.round won't work because...

View Article

How round off a vector2?

Hello. How i can round coordinates of vector without leave direction (make all vectors with same length)?![alt text][1] I want to make a vectors of the same length. Thank you. [1]:...

View Article

Make texture / spear full rounded

I´m working on my 2D Android Game and I am bothered by one thing. The edges are not completely rounded and it really bothers me.![alt text][1] ![alt text][2] [1]: /storage/temp/81253-roundsphere.png...

View Article

NES Battle city like movement when turning (teleporting to fit through the...

This is what I'm talking about [https://gyazo.com/20bd71273164bd1cfe0f276ecf83e690][1] As the title say i'd like to make my tank move through the gap smoothly without making the tank collider smaller....

View Article


How to calculate/find/get a normal vector from an object to a round planet to...

I am just starting to build a game where the player controls a tank on a round world/planet. I have implemented a gravity script that pulls objects to the planet. the tank falls and drives around and I...

View Article

Time.timescale=0 not working when the timeleft "countdown" reduce to 0

the game should stop if the timeleft=0 on update. Can someone tell me why and fix the scripts ThankYOu using UnityEngine; using System.Collections; using UnityEngine.UI; using...

View Article


Transform values not exact

hello, sometimes the transform values on a gameobject suddenly change like this: http://prntscr.com/bmz9is it's not a big issue, but is there any reason why this is the case? and a possible fix? thank you

View Article

Can't seem to round to 2 DP

I am making a slot machine game and the winning point should be in 2 decimal places to symbolize money, i tried both System.Math and Mathf.Round but none of them seems to work. Are there any other ways...

View Article


C# Mathf.Round Not Rounding Input.mouseposition

I'm trying to create a script that makes the scripted gameobject follow the mouse and round it's position. However when I played the scene the Input.mouseposition.x and Input.mouseposition.y weren't...

View Article

How Would I Make A Round Based System Like Csgo

I Am Making A unity Game Game And Would Like To Know How To Make A round Based System Like The Round Based System In Csgo? Eg. If All the team terrorists get killed Everyone That Died That Round Will...

View Article

round meshes makes the game glitch

You'll see, i recently updated unity to 5.2.1f1, & everything was fine (that was like 5 days ago). Today i opened my session again & i noticed this weird looking glitch on the textures. I don't...

View Article
Browsing index pages (87 articles)


Latest Images