Tag Info

New answers tagged

0

Turns out that I had pixel perfect enabled, without it enabled this solved the problem I was having.


1

On your FB.Login make sure you request the action public void FBLogin() { FB.Login("email, publish_actions", AuthCallback); }


1

I think you should break this up into multiple questions and try again. Offhand, I see 3 questions that all warrant their own detailed answers, but there are probably more that you can ask to get the detailed answers you wish for: Using 3D to generate 2D Sprites You can just use 3D as a way to render Sprites, i.e. by creating your animations, then ...


0

There is several different ways to accomplish this task, I found the best way for me was to use a bool and if statement like if(!PauseManager.paused) You could do something like if(!LoginPanelActive) or something then if it is paused or active the buttons just won't trigger and will not until you want them to again. This will also block drags across mobile ...


0

if (FB.IsLoggedIn) { FB.Feed( linkCaption: "YourGame", picture: "http://YourImageLink.png", linkName: "YourGameMessage!", link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag" + (FB.IsLoggedIn ? FB.UserId : "guest") ); }


0

If all you want to do is post to the feed and that's it. You can do so without the fb sdk or doing anything extra. This will only post to the wall of the person who is logged in at the time or the person you log in as during the Call. If that's all you want then I suggest removing the sdk and all the scripts that come with it and then use this on a event ...


0

replace the link to something like this link: "http://apps.facebook.com/" + FB.AppId + "/?challenge_brag" + (FB.IsLoggedIn ? FB.UserId : "guest")


0

The idea of phsically based rendering is to reach a closer approximation of how light behaves in the real world and use this model to generate a 2d impression of a 3d scene. This is basically what we are doing since the invention of 3d graphics, just with more simplified models of optics. So yes, PBR is mostly a buzzword. A perfect approximation of ...


1

Physcially-Based Rendering (PBR) is really a modern tag people use to refer to the trend of making the rendering system "correct" with regard to the real-world physics of light interacting with surfaces, rather than an exact definition of a full rendering system. In other words, I would say PBR is more a definition of the aspiration of the system than what ...


0

create the low-resolution elevation map with the algorithm you used first scale it up using linear interpolation add another round of perlin noise to the upscaled elevation map, this time with the higher resolution but smaller height scale. This will add more detail to your landscape.


1

I do this in my game by generating a distance field to a set of line segments, and using that as an additional mask on top of the radial one. Here's how its done: Generate N pairs of random points and connect them together as line segments. For each pixel in the mask, determine the distance to every line segment. Take the min over all segments, called d*. ...


0

I made some changes for your CombineTextures method, public static Texture2D CombineTexture(GameObject obj, Texture2D background, Texture2D TodrawLogo) { int width = TodrawLogo.width; int height = TodrawLogo.height; int backWidth = background.width; int backHeight = background.height; // bottom right corner int startX = backWidth - ...


0

I don't what your code architecture looks like, but you will have to make this check at some point. The simplest way to do this, imho, is to be sure that the local player only receive his own events, so, be sure to make him register to only his event. You say that, at click, you know who has clicked. Why don't you just send the event to this specific ...


0

I see two different solutions in your case: The easy one: take a look at LineRenderer The "hard" one: build your own mesh


0

This is one of the problems with early adoption - third party extensions may not catch up right away. The way I see it, you have two options: Use Unity 4.x until an extension becomes available for 5. Update the extension's code yourself. If your heart is set on using Unity 5, then you'll have to take care of these issues on a case by case basis. I ...


0

I think the orthographic size of your camera should depend on the size of your sprites (and possibly on the aspect ratio of the screen), but not on the size of the screen, so that you don't need to apply any scaling to your sprites. As a reminder, the orthographic size of the camera is the half-height of the area (in Unity world) which will be rendered on ...


0

Case 1: unity has built in networking code to handle this in full 3d if need be. Case 2: there are likely a ton of solutions to this already on the unity store for cheap or free. Personally if i was building diablo I would do something like this: When kicking off a new game my custom server would pick a random "seed" value. Any clients that join the game ...


2

I think the approach you are probably looking for is to trigger damage based on some event, which is keyed to a particular time or frame in the animation. I'm not sure exactly how you can set this up in your case as I'm not familiar with the specific tools etc. but the general concept would be: For each attack animation, define at which frame / time offset ...


2

I was experiencing this same issue where not all of the image was displaying. I solved it by setting mipmap to false (last parameter): Texture2D texture = new Texture2D(900, 900, TextureFormat.RGB24, false); My image then displayed as per the source PNG file.


1

By default, when loading a scene, everything in the previous scene is destroyed. However, some resources might remain loaded. Try use Resources.UnloadUnusedAssets. In order to prevent a GameObject from being destroyed when a new scene is loaded, you can call DontDestroyOnLoad. Make sure that your code doesn't abuse this functionality.


2

As the top notification says, in order to achieve the desired effect, you need to hold down ALT and SHIFT when clicking the stretch icon. More info: http://docs.unity3d.com/Manual/class-RectTransform.html Video: http://unity3d.com/learn/tutorials/modules/beginner/ui/rect-transform


4

Your Camera is static, which is OK in your case. In order to make it display what you want, you just need to tweak it's position. The screen size for this specific project is 7 x 7. For the camera to show it properly you need to set it's position to middle. And that's 3.5 x 3.5. Update Main Camera's position to 3.5 X and 3.5 Y. Position in the tutorial ...


1

In most games you will want to make the camera follow the player. A good way to do this is to make the camera a sub-object of the player. You can do this in the hierarchy window by dragging the Main Camera game object onto the player object, so it is listed below it with a slight indentation. That way the transformation coordinates of your camera object will ...


0

You should update the relativePosition inside your FixedUpdate function. If you don't the behaviour will have different results depending of your FPSs.


0

I can see several issues: You should probably deal the damage at the end of the animation. That way, if the damage causes the opponent to die, the animation is done and doesn't keep waving the sword over a dead body. If you can, break your animation up into several steps and deal the damage in several smaller increments, and just stop dishing out damage ...


0

Look into GUI.depth The sorting depth of the currently executing GUI behavior. It's the equivalent of CSS's z-index. Set this to determine ordering when you have different scripts running simultaneously. GUI elements drawn with lower depth values will appear on top of elements with higher values (ie, you can think of the depth as "distance" from the ...


0

You can easily achieve that effect by using a Second Camera. Assuming that your Main Camera has Depth -1, add a second camera with Depth 0. Doing this will make the Second Camera render after the first. You can then apply a specific layer Layer to your watermark object and then configure your Second Camera (Culling Mask property) to render only the ...


0

The way I've handled issues like this in the past is to keep track of a "desired angle/orientation", and then each FixedUpdate I apply a torque to nudge the object toward that orientation. You might implement this with a negative feedback control system, or error-controlled regulation, where as the bike deviates further from the goal, you apply greater and ...


0

Set the mass of your projectiles to be very low, and the mass of your characters to be higher until they are no longer affected by the collision of the projectile (mass is a variable on rigidbody component). The reason your rigidbody's push each other away is because this is what physical objects do in real life and rigidbody simulates this as accurately as ...


0

I have done something like this just today. The key idea here is to use the new Unity UI and a world space canvas. Here are the general steps needed to make this work: Create a new canvas, set it to world space. (The size should not matter, but I have only started using the new UI system recently, so I am not 100% sure of that. It works with a size of 0 ...


2

No, that's not true. It does cost that much for full professional access, but you can program and sell a game with the base free feature-set: License comparison


1

Yes, you can configure your Lights to affect only certain objects, by using Layers. Assign your objects to a specific Layer (you can use an existing layer or define your custom one). Then, in Inspector pane, use Light's Culling Mask setting to set which Layers you want it to affect.


0

In your comment you mentioned that you are setting the game objects positions instead of relying on forces or velocity. If I had to take a guess, the problem you are facing is having two rigidbodies colliding together, which in turn is affecting other rigid bodies. You have two options in this case Remove the rigidbodies altogether. If you are not using ...


3

Yes, you do need a Wii U Kit. You cannot build, deploy and run your game on a regular Wii U console. As Noctrine pointed out, there's no way Nintendo will let you publish a game that hasn't been tested on a console. Wii U dev kit specs The Wii U dev kit specs first and foremost support everything the regular retail Wii U console supports, and has the ...


1

You may want to look into this and this. Unity makes it really easy. The scripting reference is your best friend. Something like the following: if (Input.GetKeyDown(KeyCode.LeftArrow)) transform.rotation = Quaternion.Euler(0, 30, 0); else if (Input.GetKeyUp(KeyCode.LeftArrow)) transform.rotation = Quaternion.identity;


0

take a look at Elastomania. I guess this is the game you want to replicate. there are some people with unbelievable skill at this game, check youtube :) Anyway you need to take a look at inertia tensor tool. its a matrix that characterizes the solid's inertia parameters. http://en.wikipedia.org/wiki/Moment_of_inertia In your case there are many terms that ...


2

The physics raycast is a different system and doesn't see UI elements. So you can not cause the UI to block physics raycasts. However you have options: What you can do is cast two rays. One raycast for your UI elements and one for your physics objects. If your UI raycast detects a UI element, you know a UI element is in the way, and you shouldn't cast your ...


0

You should probably learn more about decals and take a look at this forum post. It looks like what you are trying to achieve. I hope it helps.


2

A few items you will need to address for a dll to work in monodevelop: Your class, constructor, and method in the dll must be public You must use a .net compiler that is compatible with monodevelop (yours is) and the language must also be compatible. F# for example isn't. Make sure to reference the assembly/dll in your references (i see you did in the ...


-1

I'm trying to build Xml object using an array method:- You can also build Xml objects using an array: $data = array( 'post' => array( 'id' => 1, 'title' => 'Best post', 'body' => ' ... ' ) ); $xml = Xml::build($data);


0

Depending on the game's field of play's size, divide the area you wish to populate with planets into a grid where each square can contain a planet in it's entirety. Now Randomly decide if there is a planet in each square of the grid, by randomizing a number. NUMBER_OF_SQUARES = width * height; NUMBER_OF_PLANETS = 28; planetsLeft = NUMBER_OF_PLANETS; while ...


2

The camera needs to be in front of the scene (some -Z value) in order to see the scene. The camera can't see things that are at or behind its depth. Set your camera position to be something like -10 for the Z component of the position. You should notice right away that the camera preview shows your sprite.


0

Since your plane is perpendicular, you wouldn't use the normals. Just like your second drawing in your album: Just ignore the Y and Z axis, of the terrain. For each point you want to match on the terrain, take the X axis value, and match that value on your perpendicular plane. For example, if the point is at (1,3,0), just take the point (1,planeTop,0) on ...


2

Clustering in Graphs I'm not sure why your assignment has given you an open research problem (clustering in graphs) to solve. Please ask your professor if this is really required before continuing. If you know the number of clusters, (or can guess them) I would suggest trying something like spectral clustering, or K-means clustering; using the number of ...


1

You can get the length of a vector (the distance from its start to end position) using vector.magnitude. Note that typically an entity doesn't move its full speed as distance in any single frame, since d = v * t. So you'll usually want to multiply your speed or velocity by your timestep to get the distance traversed this frame. Also, note that the amount ...


0

Because Vector3 is a value type, not a reference type, you need to set transform.position if you want to affect its value. That is, Vector3 currentPos = transform.position; // ...changes to currentPos.. transform.position = currentPos; If you're using Visual Studio, you can find out which are value types (struct) or reference types (class) by either ...


0

Javascript has two kinds of types, primitive types and objects. The primitive types are few and cannot be added to, thus most of the types you encounter are objects which have reference semantics. C# has reference types and value types. Unlike in Javascript, you can make new value types with constructs like struct. Unity3D's Vector3 in C# is a struct and ...


0

Okay, I'm not going through debugging your code because I think there is an easier way. Rather than checking for per pixel or rectangle collision, why not maintain a list of Vector3s and a list of floats? Populate the list of Vector3s with positions and the list of floats with the radius of the planets. private bool AddPlanetIfNoCollision(Vector3 position, ...


1

Try using Visual Studio Tools for Unity from Syntax tree http://unityvs.com/ You can debug Unity from within Vs with this plugin.


1

It's definitely possible to have a common code base if you use cross-platform technologies such as Unity or HTML5 frameworks. Though you'll always need some platform-specific work (Facebook app creation, distribution on the app stores, integration with the payment services,...) Choosing the framework highly depends on your skills and preferences. If you ...



Top 50 recent answers are included