[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/agdg/ - Amateur Game Development General

AGDG - The Board

Catalog

See 8chan's new software in development (discuss) (help out)
Please read: important information about failed Infinity Next migration
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
dicesidesmodifier
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, swf, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 5 per post.


Welcome to AGDG, have you ever made a game?
See also: /ideaguy/ | /vm/

File: 1451398542650.jpg (21.12 KB, 384x384, 1:1, 360degrees.jpg)

6a3a11 No.24631

Greetings /adgd/,

I am looking for a good way to implement a 360° attack move into UE4.

No roundhouse, but on Z-axis.

What would be best?

What would be your take on it?

71ac1c No.24632

What specifically do you mean?

Just an attack that damages any enemy in a circle? I'd spawn a cylinder and if it overlaps an enemy do the damage


f0865c No.24635

What I mean is the free choice of attacking direction in melee.

>press key

>swipe mouse

>get angle

>attack in that angle

everything combined with respective swinging. I do hope to do it via a form of blendspace with let's say 8 basic animations, or whatever works.

but how to get the mouse movement transformed to the attacking direction?

there is a "capture mouse" option, but i didnt get beyond


09c89d No.24645

>>24635

I'm gonna assume this is a 2D game, correct? At least in gameplay terms (be it top down or sidescroller).

>take mouse position

>project mouse position on game plane (the plane along which you move in 2D, so the ground plane if it's top down)

>get the projected point minus the character position

>get the vector against which you want to calculate the angle (probably forward vector of your player, perhaps up vector if it's a sidescroller)

>calculate angle between the two vectors

>congratulations


a3a688 No.24665

File: 1451718482733.webm (3.54 MB, 1280x720, 16:9, b760077fe42a08f5.webm)

>>24645

It is going to be an first person melee fighting game. See the video. It was made for an german imageboard, but the video parts show what the game does until now.

Since then I added an evasive step and sliding, if interest occures.

The last part shows the one attacking animation i have so far, found some guys who will help me with this project for further animations and in general already. Until now it is a fix animations that is just played, if the key is pressed.

What I want the attack move to be like:

> swipe mouse frome top right to bottom left --> current attack anim

> pull mouse from top to bottom --> overhead

> and so on, for every direction. the same for blocking and second hand attacks

And thanks for your input there, I guess I can kinda use it to get started / to the right direction anyway


09c89d No.24667

>>24665

Well there are many ways to do this, but what I would do is:

>take position where the click1 happened (from screenspace to world space)

>do the same for click2 (I call it click2 but I think you'll want it to be when the player releases the button after having dragged it)

>you now have the vector of the player's swing

>calculate the angle between that vector and the up or forward vector of your camera and use that to determine animation

Actually, you could use screenspace too now that I think about it, you'd get a 2D vector and then you could calculate its angle against either the X or the Y axis.


a3a688 No.24668

>>24667

I'll give it a try and keep you updated. many thanks!


a3a688 No.24669

>>24667

well, updates would take long time. guess /thread.

thanks again here




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]