Hello everyone, what is the easiest way in Clickteam Fusion 2.5 to make 360 aiming with rotating character like in Hotline Miami or Crimsonland?
360 Aiming in Top-Down Shooter (Hotline Miami clone)
Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
Clickteam.
A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.
Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!
Clickteam.
-
-
Easiest is probably using the built-in physics race-car movement,
will handle angles for you,
while shooting can just be:on fire 1
>>> shoot "bullet" at speed xxx - use direction of "character"Best looking, precise and complete solution would probably involve using some trigonometry.
-
I created a crosshair and choosed that it is mouse controlled. Now I don't know how to do that character face to the mouse controlled crosshair. So character should walk if keyboard pressed and rotate when I move mouse and crosshair.
-
To rotate the player and let him face the mouse (or crosshair) you have two choices:
builtin way:
set angle to OAngle("player", "xmouse", "ymouse")best way:
set angle to ATan2(Y( "player" ) - ymouse, xmouse - "player" ) ) -
This second choice is exactly what I mean, thank you very much and it is of course working like a charm. But how it is work? Could you explain me how it works?
Now I saw that both are working, I made a mistake in the first.
-
In the first one I included some extra "quotes" for xmouse and ymouse, maybe this led to your troubles, sorry!
The second one will show its additional potential on further distances,
since it will give you floating point precision,
while the OAngle function only returns integer values.But they work quite the same on smaller distances.
The Atan2 notation calls the "arctangent" mathematic function,
an inverse trigonometric function that will give you the angle between a horizontal X axis and the vector between two points,
here we have specified the two points being your player's X,Y and the mouse X,Y position. -
Thanks again Now I've got another problem because when I'm shooting bullets they are accurate at close range. But longer distance shoots aren't accurate at all. What is the easiest way to improve it in CF2.5?
-
If you're using set angle to OAngle("Player", xmouse, ymouse)
The result can be 33With set angle to ATan2(Y( "Player" ) - ymouse, xmouse - "Player" ) )
The result can be 33.7299The float values bring accuracy to the table. So for perfect accuracy use the second method.
-
Assuming you're using the Atan2 method,
you probably have to setup a precise method for "directing" the shoot
(the builtin "shoot in direction of..." just aims in limited range of directions)You may check this bullet example (second post):
Please login to see this link.
main focus here was on collision, but it also embeds correct aiming at crosshair like you needcheck the "fastloop bullet" group!
-
I tried both methods and the results are the same or almost the same.
-
I think you will notice a bigger difference in results the longer the distance of the bullet travels. So doing some target practice testing up close you can't see a difference, but taking long shots you could.
-
I did it in a different way. I used bouncing ball movement with "Bullet" checked in movement properties and it works like a charm, I think that it is a best method for this case. Thanks guys for ideas.
-
Easiest solution is always the best,
we sometimes tend to overcomplicate things XD -
The physics movement is a great idea! To step in late here: I made a Please login to see this link. the other day using 360-degree movement/rotations in case you're curious about that. It uses floats (decimal points) so that the projectiles always move precisely toward the target regardless of distance.
-
Very cool example Snail!
This other example I was referring was targeting (and colliding) with floating precision too >:)
Please login to see this link.
(maybe lower "speed" value of the bullet object to see better..)but I guess muskalator was happier with an equally-good-looking-but-easier-to-handle solution XD
-
I would just note that using the physics movements for bullets will have poor performance results on the mobile runtimes..
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!