Recently I am working on a 2D game called "Quest " using Unity 4.5.1 Free , still it is not ready . I have started with small steps , miles to go . Right now I am working on character animation and back ground designing . I am stuck on character Jump animation .
I will keep on posting my progress on this thread . I need your guidance as I am a beginner Game Programmer .
This is my first game … I am spending lots of time on it … yesterday night I just finished the jump animation … I am not an artist so it been very heard for me to make an character and put live on it … After a long night work I some how manage to complete the jump animation . I really don’t know how other will accept it … I am working on 30 days trial version of Fl software for creating an animation and character too .
Issue 1 # Need Help ! Is Solved Now (Thanks Nasso)
I have two camera one Main Camera and another one Player follow camera. Player follow camera is attached with player object .
Now when the player object is destroyed the player follow camera also getting destroyed And my main camera giving me the old view which is not in the current position where player got destroyed . How can i set the view to player destroyed position ? or is there other way to do that ?. What is the best practice i should follow ?
Issue #2 This Issue is Solved ( Thanks to MickM and Nasso) Background Sound and player walk sound is overlapping each other … what is the best way I can place different sound altogether .
Currently I am working on Sound Integration with my Game (Done)
Back Ground Sound
Running Sound.
3)Jump Sound.
Coin Collect Sound
Die Sound .
Progress Of my game .
Yesterday I am able to build few UI (Starting UI and Game Over UI ) and there interaction with user event . Feeling Confident
I have made UI by my own
Please Check End Level Screen . Let me know how it looks ?
nasos_333 … Thanks buddy it works … But one problem … the camera is pointing to beginning stage … it is not pointing to where my player died … am I missing some thing .
Normally when removing the parent, the camera should keep its global properties, so as long as the camera looked at the hero, it should continue to do so. Check if there are any scripts attached to the camera that point the camera to a target.
If a “lookat” script pointed the camera to the hero position, maybe it has now lost the hero and thus point to 0,0,0 or something, as a default position.
Also make sure the camera is not re-parented somehwere else by another script.
var cameraTransform = Camera.main.transform;
// make it a child of the current object Transform trns = transform; trns.position = new Vector3 (transform.position.x,3.314256f, -0.008056641f); cameraTransform.parent = trns ;
// place it behind the current object cameraTransform.localPosition = -Vector3.forward * 5;
Camera.main.transform.parent = null; // make it point towards the object cameraTransform.LookAt(trns);
//destroy our game object
Destroy(playerObject);
}
I did this . Now it is working fine for me . I have hard coded y, and Z because I don’t want to change this .
About the sound issue, i think you have to separate your background sound from the local sounds. What is the problem exactly, does one sound seem to stop or the other seems to overly override it ?
Where do you place your main music and where the hero steps ?
Hi Nesso … actualy I have placed audio source with main camera … for background sound … and set loop and play on awake setting …
for my hero game object I have placed running sound attached with audio source . once I hit the runn button my runn sound should play one shot … and it is playing so …
what is the problem actually I feel … the sound itself …
my running sound length is big and loud … so evey update it is plying and multiple running sound is plying …
buddy please how should I place proper sound for background and also runn and jump … the runn sound clip should end when my runn animation stopped …
I found out the problem … yes you are right … I did it other away just now after so many R&D … main problem was with audioSource.PlayOneShot (runnSoundClip,10.0f); function . The problem was it is playing every time on fixed update on pressing the forward button … so many sound instance is overriding each other and crating a outer world sound . So actuly what I did is from Audio source , I checked Loop and play on Awake both and also checked mute too … … Now from my script I am just doing audioSource.mute = true or false . Thanks Nasos …