How to instantiate prefab of player shield so it will look like player is in a bubble? - c#

I have a simple game in Unity and I have added some power ups. One of the power ups is a player
shield which instantiates on the player position and then follows him around. This shield is just a sphere with a transparency material. My problem is that when i instantiate shield it doesn't look like player was in the shield like in a bubble but it look like it is behind the shield. Can anyone help me out here?
Here Is the picture how it looks.
I want it to look like he is in a bubble. Can anyone help me out here?

Honestly, to me, it looks more like it is in front of the shield. Regardless, design-wise, there are four things that immediately come to mind:
Increase opacity of the bubble so that it clearly changes the color of the object inside of it
Give it an effect. Some sort of particle effect that sparkles or moves, therefore you will see it move across and behind the object within it
Ground it. have it hit the ground and result in a shadow. Shadows and a connection to the ground will provide a better perspective of where each item is
Give it a more reflective surface than the object inside it. Or change the dynamic so instead of the object reflecting light in the world, the shield does
This image conceptually shows a bit of what I referring to. Also, when it comes to design ideas, reddit is an awesome place to get opinions. r/Unity3d has a ton of helpful and friendly people that like to see people's ideas and are more than willing to comment on design. Rather than here, where it is much more programming oriented.
Hope this helps!

Related

The perspective in Unity 2D

I have issue with perspective in Unity. I'm just making a game alone and I have no idea how to fix the problem. I'm going to show you the problem on screenshots.
On the images, yellow color == collider lines
I want to go to the building closer.
I can't make collider like this:
Because it looks weird. I want it like this:
But to do this I have to change collider to something like this:
But there is still other issue... I can't go behind the building because the player won't "hide" behind the building like this:
Player will stop walking here:
I have no idea what to do now. I was trying to figure it out in any way. I was searching ideas/informations everywhere. I've run out of ideas, so I'm asking you here. Thank you in advance.

Animation Controller/Scripting in Unity

I am working on a 2.5D side scroller/platformer project just kind of as a learning experience. I imported a robot model that came with premade animations. I have 2 questions regarding setting him up for movement and his animations. First, I set up movement for x and y, but do I only need to do x? Right now if I hit the UP arrow, the character appears to jump, but feel like that is probably bad form. Am I correct in assuming I should do just the x value for movement and create a separate method for jumping? My second question is with the animation controller. I set up all my states and set my transitions, but I'm not sure what to do from there. What do I do to actually set up the transitions, if anything, and also I could use some information on setting up the animations on the programming side. I have some very slight general knowledge of it, but not much and I'm having trouble finding good solid tutorials for these specific questions.
Thanks for the help!
Yes, I would recommend doing separate controllers and script files for side to side moving and jumping. That way if you ever need to change one of those behaviours you have a specialized place to do it. Also, perhaps you have an enemy that moves side to side but doesn't jump. Or perhaps something that jumps but doesn't move. You could just drag the correct behaviour onto the game object.
as for animations, the unity learn tutorials are pretty helpful getting you started on animations and very basic state transitions

Making a tile map

I am creating a tower defense game, i need help with a method or program to make it a tile map so then i can slowly input enemies on a road have turrets that shoot at them etc, i have already tried:
Inputting a picture one by one which i failed on.
Also i tried using the program called tiled but i failed on understand how that makes it tile map so i am pretty lost on the definition on tile map now.
Could someone make some suggestions, links, explanations would be very helpful?
You can load maps generated by 'Tiled' using 'TiledSharp'.
You'll have to figure another way for getting the enemies to move on the map, getting the towers to shoot them, etc. Try this for a start:
Algorithms for realtime strategy wargame AI
You can also try to use Unity3D that might already have something ready for use (unless, of course, the reason is for you to learn the algorithms rather than making the game).
If you need more help please specify exactly what it is you're looking for, i.e. displaying the map, moving the forces, shooting at the forces, UI, etc.

Goblin XNA -- Creating a labyrinth style game

Anyone know how to use Goblin XNA to implement ball control in the same way as one might find in the board game labyrinth?
There don't appear to be any tutorials or information at all regarding how to do this, despite there being a demo video displaying just such a thing.
I've setup the environment and gravity and added the ground and a sphere. I use WorldTransformation.Decompose to extract the current orientation of the board. I know the next step will be either ApplyLinearVelocity or AddForce to the sphere based on the current board orientation, but I don't know how to constantly apply these methods to the ball so that the ball is moving in response to the movement of the ball. Adding code to the Draw or Update methods only executes the code a single time. Anyone familiar with Goblin XNA at all and able to help?
As far as I can see in Goblin XNA the Update and Draw methods are called the same way as standard XNA games. Can you give more specific information? source code perhaps?

Silverlight Collision Detection when controls are in different canvasses/layers

For our game we have to create collision detection.
The problem is that the collided objects are in different canvasses/layers, which makes collision detection by pointlocation inpossible.
Does anyone have an idea how to solve this?
It's hard to give a great answer without some more information, but if all your layers are the same size then you can just roll your own collision detection. All you need to know is the locations and sizes of two things to be collision detected. Then you just test to see if one rectangle intersects with the other rectangle.
There is also a function that might be useful to use called TranslatePoint. This translates from one UIElements coordinates to another. So if you had a ball bouncing around in a smaller area of the screen with it's own local coordinate system, you could get the ball's coordinates relative to the entire screen with this function.
Can I suggest you try using the Farseer physics engine just to save yourself some pain?
http://farseerphysics.codeplex.com/
It's very good and is in use in some WP7 games already.
http://www.farseergames.com/
There's also some Blend behaviors and helpers to make using it even easier:
http://physicshelper.codeplex.com/

Categories