I'm making a simple 2D game in Unity. The gameobject's position is different from Unity editor to my iPhone. For example, if I want to place a gameobject in the center, then I need to place it a little further up before it is in the center on my iPhone. And i'm using iPhone 5 resolution in unity. Hope you guys can help or explain why this happen.
Check the offsets of parents of the game object. It's possible that the outtermost object isn't set to be at 0,0.
Otherwise we're probably going to need to have more information to help you. Screenshots or code snippets or something.
Related
Im trying to make a simple cloud jumping game with Unity 2D and have faced a problem.
How would i make the player go "through"/"in front of" the cloud when coming under but colliding when coming down again. Or do i need to trigger the jump action somehow when "touching" the cloud without collision?
Thank you in advance. I hope my text was understandable.
I have tried many ways, i don't even know what anymore. Like with ontrigger but idk did i do it right, it didn't work, something with adding a new layer, and polygon collider but how do i even edit it clearly?
I need help :')
I would like to create a shared AR game on Android phones, where I would like to:
spawn a cube for each player on an ImageTarget
allow them to control the position of their cube
allow them to see the movements of all players' cubes
I'm using Vuforia as my AR library and PUN 2 as my networking library. I have no issue synchronizing the positions and rotations of all cubes. However, the cubes do not stay on the ImageTarget properly and "jump" around. On the other hand, if I place my two phones very close together and point them at the ImageTarget at roughly the same angle, the cubes do not jump as much.
This leads me to think that the 2 instances of ARCamera fail to realize that they are pointing at the same ImageTarget from 2 different angles, and instead think that the ImageTarget exists in 2 different orientations at the same time.
Is there any way for me to tell Vuforia that I'm using multiple instances of ARCamera pointing at the same ImageTarget? (Or if my hypothesis is completely wrong, how do I actually make a multiplayer AR game?)
Thanks so much in advance!
p.s. I know the Vuforia forums are a better place to ask this question but unfortunately that forum is not particularly active, so I'm trying my luck here.
I've solved the issue by going to the ARCamera gameobject, then in the Vuforia Behavior component, I changed the World Center Mode from DEVICE to FIRST_TARGET. This allows multiple instances of ARCameras to be in different positions.
More info on World Center Mode can be found here.
I am trying to get the arm in the spine animation to follow the mouse so it looks good when I shoot, here is an example of what I want it to do but using spine: https://www.youtube.com/watch?v=eofB2Z4-00w I have been looking through the code trying to find a specific method to develop a way to do this but have yet figured out a way!
Spine(http://esotericsoftware.com/) is an animation tool that I am using in unity for animations for a game that my team and I are developing. I am currently on the player controller and have been stuck on this part of the project for a week or so. I have developed a way to create a fire point using the bonefoller.cs script within spine-unity runtime, so it shoots from a specific position(Bone) that I set it to. Just need a way to let the arm from the shoulder to follow the exact position of the mouse so it works seamlessly. If there is anyone out there that has a background in using spine with unity that would be awesome to get some help from you! If there is also some documentation furthering my knowledge on how to do so that would also be accepted :) Thank-you in advance if you help me!!! :D
You need to construct a vector that has its origin at the shoulder position and its end at the mouse position, and the same for the arm (origin at the shoulder, end at the hand). Determine the angle between the two vectors and perform the necessary rotation on the arm to close the gap between the two vectors.
I've made an unity game for iOS devices. It has a game object(sphere) which moves by the force applied to it. But I want to limit the sphere within the screen bounds.
I've seen the unity reference to Bounds, but i don't know how apply it according to the iOS device screens. Please Help.
ThankYou.
Use Mathf.clamp to keep your movement within the screen size. This will be more efficient than using colliders on the edges of your screen. Just play around with your object until you get the right numbers to keep it on your screen. Of course if you plan to use iOS tablets etc you will need to be able to account for the change in your clamping area.
Here is a link to the Unity Documentation which actually includes an example of what you are trying to do.
http://docs.unity3d.com/Documentation/ScriptReference/Mathf.Clamp.html
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?