W
W
WeBBeW2020-11-20 15:49:13
Unity
WeBBeW, 2020-11-20 15:49:13

How to make AddForce move where the object is rotated?

Here's a triangle. Its sharp angle shows where they are going. Let's say he turned to the east (i.e. the tip points to the east), then he should move there, to the east, but it turns out like this for me. The triangle turned to the east, but for some reason it does not move there, but moves straight, but with its tip turned to the east.
I've tried a lot to get it to work, but it doesn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2020-11-20
@freeExec

Did you play football as a child? Here you are looking to the north, and the ball is looking to the east, you kick it, where will it fly?
That's right, where the force is applied, and not where the ball is looking. And here it is exactly the same - the direction depends on the force vector. Where it is directed there and flies. It is necessary to read the documentation more, and not mindlessly copy the magic numbers in the parameters from other people's examples.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question