R
R
Rook F2021-10-23 20:58:44
Unity
Rook F, 2021-10-23 20:58:44

How to use AddForce to push an object under a certain degree?

There is a degree from 0 to 360, and you need to use AddForce to push the object under this degree.
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Spartanec33, 2021-10-24
@Fox6577

AddForce requires a vector. So you google a formula from a geometry course (for example, the angle between vectors) and write a method that will convert a degree into a vector. img11.jpg
I even slipped the picchu with the formula. One of these vectors you need, and the second, respectively, so that there is an angle, you can use some kind of axis of the world.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question