- Home /
help! i want to speed faster ,don't want to change position length ..
hello,everyone
when I tried to do a shoot arrows script,it always has a problem with it
I want the arrows move faster but i dont want to change the position length like move faster.
It will has a problem when I used the collider
I'm a Taiwanese. My English is not good enough.
I hope you guys know what am I talking about... thank you.
here is some scripts I used but not working
transform.position += Vector3.right * 50 * Time.deltaTime;
rigidbody2D.AddRelativeForce(Vector3.left * 50);
transform.Translate(50 * Time.deltaTime,0,0);
Answer by Mmmpies · Dec 10, 2014 at 10:00 PM
My Taiwanese = 0 so you're better at my language than I am at yours.
I attach a script to the arrow prefab that when fired uses this:
rigidbody.AddForce(transform.TransformDirection (Vector3.right) * (_force / 5));
rigidbody.useGravity = true;
for an level 1 character _force = 1000 so (Vector3.right) * 200
I could post the full script but a lot wouldn't be needed by you.
Hope some of this helps.
EDIT:
Sorry been at work. There is a language barrier but there's always a way round these things :¬)
Can you post some screen shots to show what's happening and draw on the extra bit's you want.
Or get CamStudio so you can post a video.
Sorry your English is very good but I'm just not sure what you want.
thanks for answering me !
actually, I want the arrows to kill the enemy in the box.
(box is Invincible,enemy can jump and enemy is safe in the box.)
all the API that I know had a problem when I would like to let the speed faster.
In some situation, the arrows might cross the box,or kill the enemy in the box.
rigidbody.AddForce(transform.TransformDirection (Vector3.right) *(_force / 5));
I have tried your script ,but it has the same problem when I changed the _force to larger :(
I think I would like to the position move like 123456789 (1 second)
not like 1 3 5 7 9 (1 second)
thank you for answering me again :) (hope you know what I am talking about XD)
Your answer
Follow this Question
Related Questions
Accessing other script's variable into another script 0 Answers
Help My TP.js Script isn't working 1 Answer
change skybox via script help ? 1 Answer
Local Euler Angles problems. 0 Answers
button multitouch help 1 Answer