Timeline for Need help with physics 2D Unity
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 30, 2015 at 8:03 | comment | added | John Smith | Try replacing your rotation speed with Time.deltaTime | |
| Jul 29, 2015 at 18:36 | comment | added | Jaspreet Singh | It doesn't work. The rocket sprite starts skewing | |
| Jul 29, 2015 at 18:04 | comment | added | John Smith | You could create a variable that will be equal to Quaternion.LookRotation(TOUCH POSITION - transform.position) and then use this variable as the second rotation parameter for the Quaternion.Slerp(). Make sure your variable is in the Update function. | |
| Jul 29, 2015 at 17:48 | comment | added | Jaspreet Singh | I tried it but Lerp/Slerp requires 2 rotations. I have 1 rotation, that is the rotation of my rocket but i don't have destination rotation because the destination is just a touch on the phone's screen. How do i solve this? | |
| Jul 29, 2015 at 17:35 | comment | added | John Smith | If you don't get the effect you want you might try a similar function Quaternion.Slerp(). | |
| Jul 29, 2015 at 17:29 | comment | added | John Smith | Try using Quaternion.Lerp() it will make a smooth rotation over time, you can adjust the time | |
| Jul 29, 2015 at 17:26 | comment | added | Jaspreet Singh | No problem mate. Do you have any suggestion for this? | |
| Jul 29, 2015 at 17:25 | comment | added | John Smith | Oh try using Quaternion.Lerp() it will make a smooth rotation over time, you can adjust the time | |
| Jul 29, 2015 at 17:23 | comment | added | Jaspreet Singh | i meant that i want the rocket to start moving in the direction in which It's currently pointing then slowly rotate towards the touch point and move there. | |
| Jul 29, 2015 at 17:22 | comment | added | John Smith | I apologize once more for misunderstanding English isn't my first language | |
| Jul 29, 2015 at 17:21 | comment | added | John Smith | Cause that's how I understood the last part of your question when you said "which ever direction" | |
| Jul 29, 2015 at 17:20 | comment | added | Jaspreet Singh | Why would i randomize the direction? I want the rocket to move where user touches | |
| Jul 29, 2015 at 17:18 | comment | added | John Smith | Sorry for that my bad I meant the direction could be randomized. | |
| Jul 29, 2015 at 17:17 | comment | added | Jaspreet Singh | What do you mean by spawning position? | |
| Jul 29, 2015 at 17:14 | history | answered | John Smith | CC BY-SA 3.0 |