Snapping To A Grid - Trouble With Mathf.Round
Hey :) This is hard for me to explain so please bare with me. In my scene I have objects (Mods) that can be dragged around from above, these then snap to a grid. This works for any objects that has...
View ArticleCircle GUI Button, Javascript?
I've seen some around the forums written in C#, but I cant use that, since I cant modify it when I only know Javascript, and I have no idea where to go about it. Does anyone have any premade scripts,...
View Articleround a float to closest 1/4 / find closest number
Hello, I've run into a problem, I've been messing around with Mathf.Round, But i cant make it to round to the closest 1/4 instead of the closest full number. example 2.10f will become 2.00f 2.17f will...
View ArticleRotate problem.
there is a cube and the y rotation of the cube is random. How can i round the rotation to 90 or 180 or 270 or 0(to the nearest number)?
View ArticleZombie Round Script Help
I have a small problem with my zombie round script I've been tweaking. I've fixed 5 errors I've gotten with the script but I can't figure out what is causing an "expecting ), found :". But I've changed...
View ArticleHow to round or convert doubles?
Hey all! I am having an issue with doubles. I need a way to either round doubles to the nearest integer, or to convert them to a float or an int. Specifically, I need to get doubles to work with...
View ArticleCut Texture2D in circle format
I'm trying to make a square facebook profile fit in a rounded border by clipping its edges. I have the square texture, but I can't find any function to make it rounded, in a circle format Any help??...
View ArticleTrouble with Round Generating
Hey everyone! Currently I'm having trouble with a block matching game I'm creating. I've got the main functionality of everything down, but I still need to allow the game to create "Rounds" (i.e. Round...
View ArticleStart new round after checking neighbors C#
In the game I'm working on, I want a new round to start when the player has 5 or less blocks that do not have matching neighbors. I already have a function that calls and checks for neighbors, but it...
View ArticleRound 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 ArticleHow to make a round terrain?
I want to make an earth and I don't know if I should do it in a modeling application. If I do than how will I add water.Should I make two meshes? One for water and one for the terrain?
View ArticleRound Timer: Time.smoothDeltaTime stops the clock...
using UnityEngine; using System.Collections; public class EnemySpawn : MonoBehaviour { public float timeLeft = 300f; public float roundPause = 60f; int numEnemies = 100; public GameObject enemies;...
View ArticleRound to 0.5, 1.5, 2.5 ...
Is there a way to round a number in increments of one but to be offset by one? So for example if a number is 0.7 it would round down to 0.5 and if a number is 1.2 it will round up 1.5. Would it use...
View ArticleWarp Shader?
How can I make a flat plane with boxes sticking out look round like [this]?[1] [1]: http://24.media.tumblr.com/cc49cdf98ae63b622b931568d8d31c99/tumblr_n62hrh2H1P1r4mh0bo1_500.gif
View ArticleRound x, y and z values of object?
Hey, I'm wanting to have the objects in my scene snap to a grid and so Ive been trying to round the x, y and z values of these objects to the nearest full numbers hoping it would give this effect. My...
View ArticleHow can I detect when a float value crosses an integer threshold?
I have a float value that I'm trying to have trigger a sound event whenever it crosses past an integer threshold. The user is able to increment the value in 0.1 increments. In other words, whenever the...
View Articleround numbers in JS
Hello. I need help with something I never saw before... If it possible to round numbers with comma so that the comma dissapears? **Example: From 20,384903 to 20** Thank you for any help ;)
View Articlehow do you make a map which can be circumnavigated?
im trying to make a map which if you go to one edge you appear at the otherside.
View ArticleRound Slider (Circle shaped slider GUI control)
Are there any GUI examples that creates a round slider control sort? By slider I mean ones like this [http://docs.unity3d.com/Documentation/ScriptReference/GUI.HorizontalSlider.html][1] To get an idea...
View ArticleIs it possible to round down 0.99 to 0?
Hey guys! I was wondering if it was possible to round down numbers by just stripping of the decimal places of it. 0.75->0 , 5.1 -> 5 etc. Maybe it'd be possible by converting floats to ints, but...
View Article