K
K
KUTARUM2021-09-12 12:35:17
Unity
KUTARUM, 2021-09-12 12:35:17

How to make selection of weapons and further shooting in Unity2D?

There is such a situation: we have a person who needs to pick up a weapon and start shooting at a target. BUT. also the man must turn at some moments, and the weapon must turn with him. So is it possible to make it so that when picking up a weapon it could:
1. Shoot 2. Turn
around with the person
???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2021-09-12
@GavriKos

Can. To do this, you need to think with your head and write a little (or a lot) of code.
Your question is highly abstract and sounds like an assignment.

N
Nekit Medvedev, 2021-09-16
@NIKROTOS

We create a weapon object on the character (the child object will rotate with the parent), by pressing the key we transfer the weapon mesh / sprite to this object (the object should already be at the coordinates where the weapon should be), play the animation, if necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question