- Home /
change timescale for a specific gameobject
hello guys i want reduce my projectle speed that works with this code
var pos : Vector2 = Vector2(1,1);
clone = Instantiate(Bubble ,particlePlacement , transform.rotation);
clone.rigidbody.AddForce (pos *52 );
but i wanna that bullet move with slower speed , so i changed the timescale but the problem is that other objects speed change too , would anyone tell me that how can i change the timescale , just for the bullet ? thanx
There is no way I know of to change the timescale for a specific object, but you might get what you want by increasing the mass of the object and/or adjusting the the amount of force you apply.
BTW never change the timescale for any reason.
as Robert explains, just reduce the force. Also look at the 'drag" settings in rigidbody.
also you may prefer to use "explosive force" (look at the docs) and much mroe likely you would apply some force every frame for a few seconds, not just all at the start.
also, although in game engines you "never just set the velocity" in fact in this rare case you may be better to just set the velocity of the bullet
search on here for 1000s of examples of doing bullets well
also generally you never instantiate during gameplay .. do this ..
http://answers.unity3d.com/questions/321762/how-to-assign-variable-to-a-prefabs-child.html
heh! hope some of that helps
Your answer

Follow this Question
Related Questions
timeScale doesn't work 0 Answers
Accelerating Time Dramatically 1 Answer
how to fade audio if Time.timeScale = 0.0 ?? 2 Answers